Fundamentals of the ten-year OPS series-Linux
Zeng Lin
Contact: [Email protected]
Website: www.jplatformx.com
Copyright: Please do not reprint the article without permission
First, Introduction
The purpose of the RM command is to delete files and directories as follows:
RM Item ...
Where item is the name of one or more files (or directories).
Use the RM command with special care because the Unix-like operating system (such as Linux) does not contain commands to restore the delete operation. Once the RM command is used, it is completely removed. The Linux system Default user is wise and knows what you are doing.
Second, command options
The following table lists the command options for RM commands, mainly including directory deletion, interactive deletion, and so on. It is sufficient to remember the following 4 options in general daily work.
Options |
Meaning |
-I.,--interactive |
Prompts the user for confirmation before deleting an existing file. If this option is not specified, the RM command deletes the file by default |
-R,--recursive |
Removes the directory recursively. That is, if the deleted directory has subdirectories, delete them as well. To delete a directory, you must specify this option |
-F,--force |
Ignores files that do not exist and does not require prompt confirmation. This option overrides the--interactive option |
-V,--verbose |
Display informational messages when deleting files |
(007) The RM for Linux commands