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  might  be  possible  to
75       recover  some  of its contents, given sufficient expertise and/or time.
76       For greater assurance that the contents are truly  unrecoverable,  con‐
77       sider using shred.
78

AUTHOR

80       Written  by  Paul  Rubin, David MacKenzie, Richard M. Stallman, and Jim
81       Meyering.
82

REPORTING BUGS

84       Report rm bugs to bug-coreutils@gnu.org
85       GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
86       General help using GNU software: <http://www.gnu.org/gethelp/>
87       Report rm translation bugs to <http://translationproject.org/team/>
88
90       Copyright © 2010 Free Software Foundation, Inc.   License  GPLv3+:  GNU
91       GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
92       This  is  free  software:  you  are free to change and redistribute it.
93       There is NO WARRANTY, to the extent permitted by law.
94

SEE ALSO

96       unlink(1), unlink(2), chattr(1), shred(1)
97
98       The full documentation for rm is maintained as a  Texinfo  manual.   If
99       the  info and rm programs are properly installed at your site, the com‐
100       mand
101
102              info coreutils 'rm invocation'
103
104       should give you access to the complete manual.
105
106
107
108GNU coreutils 8.5                November 2010                           RM(1)
Impressum