BSD 4_3_Tahoe development
[unix-history] / usr / man / cat1 / rmdir.0
RMDIR(1) UNIX Programmer's Manual RMDIR(1)
N\bNA\bAM\bME\bE
rmdir, rm - remove (unlink) directories or files
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
r\brm\bmd\bdi\bir\br dir ...
r\brm\bm [ -\b-f\bf ] [ -\b-r\br ] [ -\b-i\bi ] [ -\b- ] file ...
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
_\bR_\bm_\bd_\bi_\br removes entries for the named directories, which must
be empty.
_\bR_\bm removes the entries for one or more files from a direc-
tory. If an entry was the last link to the file, the file
is destroyed. Removal of a file requires write permission
in its directory, but neither read nor write permission on
the file itself.
If a file has no write permission and the standard input is
a terminal, its permissions are printed and a line is read
from the standard input. If that line begins with `y' the
file is deleted, otherwise the file remains. No questions
are asked and no errors are reported when the -\b-f\bf (force)
option is given.
If a designated file is a directory, an error comment is
printed unless the optional argument -\b-r\br has been used. In
that case, _\br_\bm recursively deletes the entire contents of the
specified directory, and the directory itself.
If the -\b-i\bi (interactive) option is in effect, _\br_\bm asks whether
to delete each file, and, under -\b-r\br, whether to examine each
directory.
The null option -\b- indicates that all the arguments following
it are to be treated as file names. This allows the specif-
ication of file names starting with a minus.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
rm(1), unlink(2), rmdir(2)
Printed 7/9/88 April 29, 1985 1