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 M.  Stallman,  and  Jim
80       Meyering.
81

REPORTING BUGS

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

SEE ALSO

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