1RM(1)                            User Commands                           RM(1)
2
3
4

NAME

6       rm - remove files or directories
7

SYNOPSIS

9       rm [OPTION]... FILE...
10

DESCRIPTION

12       This  manual  page  documents  the  GNU version of rm.  rm removes each
13       specified file.  By default, it does not remove directories.
14
15       If the -I or --interactive=once option is given,  and  there  are  more
16       than  three  files  or  the  -r,  -R, or --recursive are given, then rm
17       prompts the user for whether to proceed with the entire operation.   If
18       the response is not affirmative, the entire command is aborted.
19
20       Otherwise,  if  a file is unwritable, standard input is a terminal, and
21       the -f or --force  option  is  not  given,  or  the  -i  or  --interac‐
22       tive=always  option is given, rm prompts the user for whether to remove
23       the file.  If the response is not affirmative, the file is skipped.
24

OPTIONS

26       Remove (unlink) the FILE(s).
27
28       -f, --force
29              ignore nonexistent files, never prompt
30
31       -i     prompt before every removal
32
33       -I     prompt once before removing  more  than  three  files,  or  when
34              removing  recursively.  Less intrusive than -i, while still giv‐
35              ing protection against most mistakes
36
37       --interactive[=WHEN]
38              prompt according to WHEN: never,  once  (-I),  or  always  (-i).
39              Without WHEN, prompt always
40
41       --one-file-system
42              when  removing  a hierarchy recursively, skip any directory that
43              is on a file system different from  that  of  the  corresponding
44              command line argument
45
46       --no-preserve-root
47              do not treat `/' specially
48
49       --preserve-root
50              do not remove `/' (default)
51
52       -r, -R, --recursive
53              remove directories and their contents recursively
54
55       -v, --verbose
56              explain what is being done
57
58       --help display this help and exit
59
60       --version
61              output version information and exit
62
63       By default, rm does not remove directories.  Use the --recursive (-r or
64       -R) option to remove each listed directory, too, along with all of  its
65       contents.
66
67       To  remove a file whose name starts with a `-', for example `-foo', use
68       one of these commands:
69
70              rm -- -foo
71
72              rm ./-foo
73
74       Note that if you use rm to remove a file, it  is  usually  possible  to
75       recover the contents of that file.  If you want more assurance that the
76       contents are truly unrecoverable, consider using shred.
77

AUTHOR

79       Written by Paul Rubin, David MacKenzie, Richard Stallman, and Jim  Mey‐
80       ering.
81

REPORTING BUGS

83       Report bugs to <bug-coreutils@gnu.org>.
84
86       Copyright © 2007 Free Software Foundation, Inc.
87       This  is  free  software.   You may redistribute copies of it under the
88       terms      of      the      GNU      General       Public       License
89       <http://www.gnu.org/licenses/gpl.html>.   There  is NO WARRANTY, to the
90       extent permitted by law.
91

SEE ALSO

93       unlink(1), unlink(2), chattr(1), shred(1)
94
95       The full documentation for rm is maintained as a  Texinfo  manual.   If
96       the  info and rm programs are properly installed at your site, the com‐
97       mand
98
99              info rm
100
101       should give you access to the complete manual.
102
103
104
105GNU coreutils 6.9                 March 2008                             RM(1)
Impressum