.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH RM 1 2020年三月 "GNU coreutils 8.32" 用戶命令 .SH 名稱 rm \- 移除文件或者目錄 .SH 概述 \fBrm\fP [\fI\,選項\/\fP]... \fI\,文件列表\/\fP... .SH 描述 本手冊頁記錄 GNU 版本的 \fBrm\fP。\fBrm\fP 移除每一個指定的文件。默認情況下,它不刪除目錄。 .P If the \fI\-I\fP or \fI\-\-interactive=once\fP option is given, and there are more than three files or the \fI\-r\fP, \fI\-R\fP, or \fI\-\-recursive\fP are given, then \fBrm\fP prompts the user for whether to proceed with the entire operation. If the response is not affirmative, the entire command is aborted. .P Otherwise, if a file is unwritable, standard input is a terminal, and the \fI\-f\fP or \fI\-\-force\fP option is not given, or the \fI\-i\fP or \fI\-\-interactive=always\fP option is given, \fBrm\fP prompts the user for whether to remove the file. If the response is not affirmative, the file is skipped. .SH 選項 .PP 刪除 (unlink) 給定文件。 .TP \fB\-f\fP, \fB\-\-force\fP 忽略不存在的文件和參數,從不提示 .TP \fB\-i\fP 在每次刪除前提示 .TP \fB\-I\fP 在進行遞歸刪除或刪除多於三個文件之前提示用戶一次;與 \fB\-i\fP 相比較更少干擾用戶,但是仍然爲大多數操作失誤起到保護作用。 .TP \fB\-\-interactive\fP[=\fI\,WHEN\/\fP] 根據 WHEN 確定提示用戶的頻率: "never"(從不)、"once" (\fB\-I\fP)、或者 "always" (\fB\-i\fP);如果沒有給定 WHEN 參數,則總是提示用戶。 .TP \fB\-\-one\-file\-system\fP 在遞歸地刪除一個目錄結構時,跳過與對應命令行參數不在同一個文件系統中的所有目錄 .TP \fB\-\-no\-preserve\-root\fP 不對 '/' 做特殊處理 .TP \fB\-\-preserve\-root\fP[=\fI\,all\/\fP] 不要刪除“/”(默認行爲);如添加了“all”參數,將拒絕處理與父目錄位於不同設備上的命令行參數 .TP \fB\-r\fP, \fB\-R\fP, \fB\-\-recursive\fP 遞歸地移除目錄及它們的內容 .TP \fB\-d\fP, \fB\-\-dir\fP 刪除空目錄 .TP \fB\-v\fP, \fB\-\-verbose\fP 解釋正在發生的情況 .TP \fB\-\-help\fP 顯示此幫助信息並退出 .TP \fB\-\-version\fP 顯示版本信息並退出 .PP 默認情況下,rm 不移除目錄。可以使用 \fB\-\-recursive\fP(\fB\-r\fP 或 \fB\-R\fP)選項來同時移除列出的每個目錄及其內容。 .PP 如果需要刪除一個文件名以連字符 “\-”起始的文件,例如 '\-foo',請使用下列命令: .IP rm \fB\-\-\fP \fB\-foo\fP .IP rm ./\-foo .PP 請注意,如果你使用 rm 刪除一個文件,在有足夠技術水平和/或時間的情況下,它的部分內容可能仍然能夠被恢復。如果需要更高的保障來使得文件內容不可恢復,請考慮使用 shred. .SH 作者 由 Paul Rubin, David MacKenzie, Richard M. Stallman 和 Jim Meyering 編寫。 .SH 報告錯誤 GNU coreutils 的在線幫助: .br 請向 報告翻譯錯誤。 .SH 版權 Copyright \(co 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later . .br This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .SH 參見 unlink(1), unlink(2), chattr(1), shred(1) .PP .br 完整文檔請見: .br 或者在本地使用: info \(aq(coreutils) rm invocation\(aq .SH "跋" .br 本頁面中文版由中文 man 手冊頁計劃提供。 .br 中文 man 手冊頁計劃:\fBhttps://github.com/man-pages-zh/manpages-zh\fR