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.
rm
PORTABILITY
POSIX.2. x/OPEN Portability Guide 4.0. All UNIX systems. Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.
The
AVAILABILITY
PTC MKS Toolkit for Power Users
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC Windchill Requirements and Validation
SEE ALSO
PTC MKS Toolkit 10.4 Documentation Build 39.