SYNOPSIS
rm [
DESCRIPTION
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.
Options
-d -
delays 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.
-f -
deletes read-only files immediately, without asking for confirmation. When you specify this option and a file does not exist, rm does not display a warning 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. -i -
prompts for confirmation (from standard input) 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. -q -
suppresses warning messages. Error messages are still displayed. When you specify this option and a file does not exist, rm does not display a warning message but it does modify the exit status.
-R -
recursively removes the entire directory structure if file is a directory.
-r -
is equivalent to
-R . -s -
saves 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. -v -
prints file names to standard output as they are being processed.
DIAGNOSTICS
Possible exit status values are:
- 0
-
Successful completion.
- 1
-
Failure due to any of the following:
- 2
-
Failure due to any of the following:
NOTE
rm is provided as both an external utility and a built-in MKS KornShell utility.
PORTABILITY
POSIX.2. x/OPEN Portability Guide 4.0. All UNIX systems. Windows 2000. Windows XP. Windows Server 2003. Windows Vista.
The
AVAILABILITY
MKS Toolkit for Power Users
MKS Toolkit for System Administrators
MKS Toolkit for Developers
MKS Toolkit for Interoperability
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
MKS Source Integrity Standard
MKS Source Integrity Enterprise Edition
SEE ALSO
MKS Toolkit 9.2 Documentation Build 16.