.TH rm "" "" Command
.PC "Remove files"
\fBrm [ \-firtv ] \fIfile ... \fR
.PP
.HS
.SH Options:
.IC \fB\-f\fR
Force: remove unwritable files, suppress error messages and prompts
.IC \fB\-i\fR
Ask before removing each file
.IC \fB\-r\fR
Recursively remove entire directory structure
.IC \fB\-t\fR
Test: perform all checks but do not remove files
.IC \fB\-v\fR
Verbose: report the disposition of each file
.HE
.B rm
removes each
.IR file .
If no other links exist,
.B rm
frees the data blocks associated with the file.
.PP
To remove a file, a user must have
write and execute permission on the directory in which the
file resides, and must also have write permission on the file itself.
The force option
.B \-f
forces the file to be removed if the user does not have
write permission on the file itself.
It suppresses all error messages and prompts.
.PP
The interactive option
.B \-i
tells
.B rm
to prompt for permission to delete each
.IR file .
.PP
The recursive removal option
.B \-r
causes
.B rm
to descend into every directory, search for and delete
files, and descend further into subdirectories.
Directories are removed if the directory
is empty, is not the current directory, and is not the root directory.
.PP
The
test option
.B \-t
performs all access testing
but removes no files.
.PP
The
verbose option
.B \-v
tells
.B rm
to print each file rm and the action taken.
In conjunction with the
.B \-t
option, this allows the extent of possible damage to be previewed.
.SH "See Also"
.Xr "commands," commands
.Xr "ln," ln
.Xr "rmdir" rmdir.c
.SH Notes
Absence of delete permission in parent directories is reported
with the message \fIfile\fB: permission denied\fR.
Write protection is not inherited by subdirectories; they must be
protected individually.
.PP
Note that unlike the similarly named command under \*(MD,
\*(CO's version of
.B rm
will
.I not
prompt you if you request a mass deletion.
Thus, the command
.DM
	rm *
.DE
.PP
will silently and immediately delete all files in the current directory.
.I "Caveat utilitor!"
