1 .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.35.
2 .TH RM "1" "March 2007" "GNU coreutils 6.9" "User Commands"
4 rm \- remove files or directories
7 [\fIOPTION\fR]... \fIFILE\fR...
10 documents the GNU version of
13 removes each specified file. By default, it does not remove
16 If the \fI\-I\fR or \fI\-\-interactive\=once\fR option is given,
17 and there are more than three files or the \fI\-r\fR, \fI\-R\fR,
18 or \fI\-\-recursive\fR are given, then
20 prompts the user for whether to proceed with the entire operation. If
21 the response is not affirmative, the entire command is aborted.
23 Otherwise, if a file is unwritable, standard input is a terminal, and
24 the \fI\-f\fR or \fI\-\-force\fR option is not given, or the
25 \fI\-i\fR or \fI\-\-interactive\=always\fR option is given,
27 prompts the user for whether to remove the file. If the response is
28 not affirmative, the file is skipped.
31 Remove (unlink) the FILE(s).
33 \fB\-f\fR, \fB\-\-force\fR
34 ignore nonexistent files, never prompt
37 prompt before every removal
40 prompt once before removing more than three files, or
41 when removing recursively. Less intrusive than \fB\-i\fR,
42 while still giving protection against most mistakes
44 \fB\-\-interactive\fR[=\fIWHEN\fR]
45 prompt according to WHEN: never, once (\fB\-I\fR), or
46 always (\fB\-i\fR). Without WHEN, prompt always
48 \fB\-\-one\-file\-system\fR
49 when removing a hierarchy recursively, skip any
50 directory that is on a file system different from
51 that of the corresponding command line argument
53 \fB\-\-no\-preserve\-root\fR
54 do not treat `/' specially
56 \fB\-\-preserve\-root\fR
57 do not remove `/' (default)
59 \fB\-r\fR, \fB\-R\fR, \fB\-\-recursive\fR
60 remove directories and their contents recursively
62 \fB\-v\fR, \fB\-\-verbose\fR
63 explain what is being done
66 display this help and exit
69 output version information and exit
71 By default, rm does not remove directories. Use the \fB\-\-recursive\fR (\fB\-r\fR or \fB\-R\fR)
72 option to remove each listed directory, too, along with all of its contents.
74 To remove a file whose name starts with a `\-', for example `\-foo',
75 use one of these commands:
77 rm \fB\-\-\fR \fB\-foo\fR
81 Note that if you use rm to remove a file, it is usually possible to recover
82 the contents of that file. If you want more assurance that the contents are
83 truly unrecoverable, consider using shred.
85 Written by Paul Rubin, David MacKenzie, Richard Stallman, and Jim Meyering.
87 Report bugs to <bug\-coreutils@gnu.org>.
89 Copyright \(co 2007 Free Software Foundation, Inc.
91 This is free software. You may redistribute copies of it under the terms of
92 the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
93 There is NO WARRANTY, to the extent permitted by law.
95 unlink(1), unlink(2), chattr(1), shred(1)
97 The full documentation for
99 is maintained as a Texinfo manual. If the
103 programs are properly installed at your site, the command
107 should give you access to the complete manual.