rmremove files |
Command |
rm [-fiRrv]
[-d|s] file ...
rm removes each specified file argument (provided
that it is a valid path name). If you specify either . or
.. as the final component of the path name for a file,
rm displays an error message, and moves onto the next file.
If you specify a file you do not have write permission for,
rm asks you for confirmation. Type the yes expression
defined in LC_MESSAGES (the English expression is
typically y or yes) if you really want it deleted.
-ddelays the removal of the specified files until the system is rebooted.
This option and the -s option are mutually exclusive.
This option relies upon the underlying operating system's capability to perform the action at reboot time.
-fdeletes read-only files immediately, without asking for confirmation.
When you specify this option and a file does not exist,
rm does not display an error message and does not
modify the exit status. If you specify both -f and
-i, rm uses the option that
appears last on the command line.
-iprompts for confirmation before deleting each file or confirmation
before entering a subdirectory if either the -r or
-R option is specified. If you specify both
-f and -i,
rm uses the option that appears last on the command
line.
-Rrecursively removes the entire directory structure if file is a directory.
-ris equivalent to -R.
-ssaves the file for undeletion if possible. An attempt is made to put
the file in the Recycle Bin and if this attempt fails then
the file is quietly deleted. This option and the
-d option are mutually exclusive.
-vprints file names to standard output as they are being processed.
0Successful completion.
1Failure due to any of the following:
-r or -R-r or -R-r
or -R2Failure due to any of the following:
-d, -s, and -v
options are extensions to the POSIX standard.