Manual Page Result
0
Command: rm | Section: 1 | Source: UNIX v10 | File: rm.1
RM(1) General Commands Manual RM(1)
NAME
rm - remove (unlink) files
SYNOPSIS
rm [ -fri ] file ...
DESCRIPTION
Rm removes directory entries. If an entry was the last link to a file,
the file is destroyed. If an entry is a directory it is removed only
if empty. Removal of a file requires write permission in its direc-
tory, but neither read nor write permission on the file itself.
If a file lacks write permission and the the standard input is a termi-
nal, a query is written to the standard output and a line is read from
the standard input. If that line begins with the file is deleted, oth-
erwise the file remains. The options are
-f (force) Ask no questions about unwritable files and report no
errors.
-r Recursively delete the entire contents of a directory and the
directory itself.
-i (interactive) Ask whether to delete each file, and, under -r,
whether to examine each directory. If the first character of
the response is the answer is yes; otherwise the answer is no.
SEE ALSO
unlink(2)
DIAGNOSTICS
It is forbidden to remove the file merely to avoid the antisocial con-
sequences of inadvertently doing something like
RM(1)