.th RM I 1/20/73
.sh NAME
rm  \*- remove (unlink) files
.sh SYNOPSIS
.bd rm
[
.bd \*-f
] [
.bd \*-r
] name ...
.sh DESCRIPTION
.it Rm
removes the entries for one or more files from a directory.
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.
.s3
If there is no write permission to a
file designated to be removed,
.it rm
will print the file name, its mode and then
read a line from the standard input.
If the line begins with \fBy\fR, the file is removed,
otherwise it is not.
The optional argument
.bd \*-f
prevents this interaction.
.s3
If a designated file is a directory,
an error comment is printed unless the optional
argument
.bd \*-r
has been used.
In that case,
.it rm
recursively deletes the
entire contents of the specified directory.
To remove directories \fIper se\fR see rmdir(I).
.sh FILES
/etc/glob to implement the
.bd \*-r
flag
.sh "SEE ALSO"
rmdir(I)
.sh BUGS
When
.it rm
removes the contents of a directory under the
.bd \*-r
flag, full pathnames are not printed in diagnostics.
