The following content is from "Bird's private Cuisine"
Copy, delete, and move under the Linux command line: CP,RM,MV
CP (COPY) replication
CP This command is used many, in addition to simple replication, you can also create a link file compared to two of the old and new files to be updated,
and copying the entire directory, etc.
Grammar
CP [-ADFILPRSU] source file destination file
source file (sources)
Target file (destination)
Options
-A: equivalent to the meaning of-pdr, please refer to the following article
-D: If the source file is a property of a linked file, the linked file property is copied instead of the file itself
-F: Mandatory means (force), that is, overwrite the existing file
RM (remove) Delete
Grammar
RM [-rfi] File or directory
Options
-R: Recursive operation
-F: Mandatory (force)
-I: Prompt message when deleting
This rm-rf file/dir This command is very dangerous, unless very certain,
Otherwise it is recommended to add the I option
Note: You should do this when a file starts with a--
#rm-RF---filename-
Precede the file name with--
Or specify a file under a directory, such as
#rm-RF./-filename-
MV (move) Move file or directory, rename
Grammar
MV [-finu] source destination
MV [-finu] Source ... directory
Options
-F: If the target file exists, it will be overwritten
-I: Prompt information
-N: If the target file exists, does not overwrite
-U: Update if the source file is newer than the target file, or if the destination file is missing, otherwise not updated
In the same directory, the MV also has the function of renaming
# MV ABC CBA
Use of the CP,RM,MV command on the Linux command line