RM(1) — USER COMMANDS
NAME
rm, rmdir − remove (unlink) files or directories
SYNOPSIS
rm [ −r ] [ −f ] [ −i ] [ − ] filename ...
rmdir directory ...
DESCRIPTION
Rm
rm removes (directory entries for) one or more files. If an entry was the last link to the file, the contents of that file are lost. (See ln(1) for more information about multiple links to files.)
To remove a file, you must have write permission in its directory; but you don’t need read or write permission on the file itself. If you don’t have write permission on the file and the standard input is a terminal, rm displays the file’s permissions and waits for you to type in a response. If your response begins with ‘y’ the file is deleted; otherwise the file is left alone.
Rmdir
rmdir removes each named directory, which must be empty.
OPTIONS
−fForce files to be removed without displaying permissions, asking questions or reporting errors.
−rRecursively delete the contents of a directory, its subdirectories, and the directory itself.
−iAsk whether to delete each file, and, under −r, whether to examine each directory. Sometimes called the interactive option.
−Treat the following arguments as filenames — so that you can specify filenames starting with a minus.
WARNING
It is forbidden to remove the file ‘..’ to avoid the antisocial consequences of inadvertently doing something like ‘rm −r .∗’.
SEE ALSO
Sun Release 3.2 — Last change: 1 Aug 1986