The copy, move, and delete commands for files under Linux are:Cp,mv,rm
I. File copy command CP
Command format: Cp[-adfilprsu] source file (source) destination file (destination)
CP [option] source1 source2 source3 ... directory
Parameter description:
-A: Refers to the meaning of archive, but also refers to copying all the directories
-D: If the source file is a connection file, the connection file property is copied instead of the file itself
-F: Mandatory (force), if there are duplicates or other questions, do not ask the user, and force replication
-I: If the target file (destination) already exists, the overwrite will ask if the action is true
-L: Create a hard link connection file instead of copying the file itself
-P: Copy with the properties of the file instead of using the default properties
-R: Recursive replication for directory replication operations
-S: Copy into a symbolic connection file (symbolic link), which is the "shortcut" file
-U: If the target file is older than the source file, update the target file
If you copy file1 from the/test1 directory to the/TEST3 directory and change the file name to File2, you can enter the following command:
Cp/test1/file1/test3/file2
Second, the file Movement command MV
Command format: MV[-FIV] Source destination
Parameter description:
-f:force, forcing direct movement without asking
-I: If the target file (destination) already exists, you will be asked to overwrite
-U: Update if the target file already exists and the source file is newer
If you copy file1 from the/test1 directory to the/TEST3 directory and change the file name to File2, you can enter the following command:
Mv/test1/file1/test3/file2
Third, the file Delete command rm
Command format: RM [fir] File or directory
Parameter description:
-F: Force delete
-I: Interactive mode, asking the user whether to operate before deleting
-R: Recursive delete, commonly used in directory deletion
If you delete the File1 file under the/test directory, you can enter the following command:
rm-i/test/file1 reprint: http://blog.sina.com.cn/s/blog_7479f7990101089d.html
Copy, move, and delete files under Linux