Specifications

184 Version 2.0
rm
Summary
Deletes one or more files or directories.
Usage
rm [-q] file/directory [file/directory ...]
Options
-q
Quiet mode; does not prompt user for a confirmation
file
File name (wildcards are permitted)
directory
Directory name (wildcards are permitted)
Description
This command deletes one or more files or directories. If the target is a directory, it
will delete the directory, including all its subdirectories. It is not allowed to redirect a
file whose parent directory (or the file itself) is being deleted.
Removing a read-only file/directory will result in a failure. Removing a directory
containing read-only file(s) will result in a failure. If an error occurs, rm will exit
immediately and later files/directories will not be removed.
You cannot remove a directory when the current directory is itself or its subdirectory.
If file contains wildcards, it will not ask user for confirmation.
You cannot remove the root directory. You cannot remove the current directory or its
ancestor.
Status Codes Returned
SHELL_SUCCESS The action was completed as requested.
SHELL_NOT_FOUND The target file or directory was not able to be found
SHELL_SECURITY_VIOLATION This function was not performed due to a security violation
SHELL_WRITE_PROTECTED The target media was write-protected.
Examples
To remove multiple directories at a time: