GNU coreutils 8.28
manpages-zh
Chinese manual pages
man-pages-zh_tw
Traditional Chinese Linux man pages
coreutils
The basic file, shell and text manipulation utilities of the GNU operating system
coreutils-common
coreutils common optional components
coreutils-doc
Documentation for the GNU Core Utilities
名稱
rm - 移除文件或者目錄
概述
rm [\,選項\/]... \,文件列表\/...
描述
本手冊頁記錄 GNU 版本的 rm。rm 移除每一個指定的文件。默認情況下,它不刪除目錄。
如果指定 -I 或 --interactive\=once 選項,且給出了三個以上的文件或指定了 -r, -R 或 --recursive 選項,則 rm 將提示並詢問用戶是否繼續進行整個操作。如果未得到用戶的確認,則整個命令將被中止。
否則,如果一個文件不可寫、標準輸入是一個終端且未給出 -f 或 --force 選項,或 --interactive\=always 選項被給出, rm 將提示用戶是否刪除該文件。如果未得到用戶的確認,則該文件將被跳過。
選項
刪除 (unlink) 給定文件。
-f, --force | |
忽略不存在的文件和參數,從不提示 | |
-i | 在每次刪除前提示 |
-I | 在進行遞歸刪除或刪除多於三個文件之前提示用戶一次;與 -i 相比較更少干擾用戶,但是仍然爲大多數操作失誤起到保護作用。 |
--interactive[=\,WHEN\/] | |
根據 WHEN 確定提示用戶的頻率: "never"(從不)、"once" (-I)、或者 "always" (-i);如果沒有給定 WHEN 參數,則總是提示用戶。 | |
--one-file-system | |
在遞歸地刪除一個目錄結構時,跳過與對應命令行參數不在同一個文件系統中的所有目錄 | |
--no-preserve-root | |
不對 ’/’ 做特殊處理 | |
--preserve-root | |
不刪除 ’/’(默認) | |
-r, -R, --recursive | |
遞歸地移除目錄及它們的內容 | |
-d, --dir | 刪除空目錄 |
-v, --verbose | |
解釋正在發生的情況 | |
--help | 顯示此幫助信息並退出 |
--version | |
顯示版本信息並退出 | |
默認情況下,rm 不移除目錄。可以使用 --recursive(-r 或 -R)選項來同時移除列出的每個目錄及其內容。 | |
如果需要刪除一個文件名以連字符 “-”起始的文件,例如 ’-foo’,請使用下列命令: | |
rm -- -foo | |
rm ./-foo |
作者
由 Paul Rubin, David MacKenzie, Richard M. Stallman 和 Jim Meyering 編寫。
報告錯誤
GNU coreutils 的在線幫助: <http://www.gnu.org/software/coreutils/>
請向 <http://translationproject.org/team/zh_CN.html> 報告 rm 的翻譯錯誤。
請向 <http://translationproject.org/team/zh_CN.html> 報告 rm 的翻譯錯誤。
版權
Copyright © 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
跋
本頁面中文版由中文 man 手冊頁計劃提供。
中文 man 手冊頁計劃:https://github.com/man-pages-zh/manpages-zh
中文 man 手冊頁計劃:https://github.com/man-pages-zh/manpages-zh