1RM(1)                       General Commands Manual                      RM(1)
2
3
4

NAME

6       rm, rmdir  - remove (unlink) files
7

SYNOPSIS

9       rm [ -fri ] file ...
10
11       rmdir dir ...
12

DESCRIPTION

14       Rm  removes  the entries for one or more files from a directory.  If an
15       entry was the last link to the file, the file is destroyed.  Removal of
16       a file requires write permission in its directory, but neither read nor
17       write permission on the file itself.
18
19       If a file has no write permission and the standard input is a terminal,
20       its permissions are printed and a line is read from the standard input.
21       If that line begins with `y' the file is deleted,  otherwise  the  file
22       remains.  No questions are asked when the -f (force) option is given.
23
24       If a designated file is a directory, an error comment is printed unless
25       the optional argument -r has been used.  In that case,  rm  recursively
26       deletes  the entire contents of the specified directory, and the direcā€
27       tory itself.
28
29       If the -i (interactive) option is in effect, rm asks whether to  delete
30       each file, and, under -r, whether to examine each directory.
31
32       Rmdir removes entries for the named directories, which must be empty.
33

SEE ALSO

35       unlink(2)
36

DIAGNOSTICS

38       Generally  self-explanatory.   It  is forbidden to remove the file `..'
39       merely to avoid the  antisocial  consequences  of  inadvertently  doing
40       something like `rm -r .*'.
41
42
43
44                                                                         RM(1)
Impressum