Commands for copying, moving, and deleting files in Linux are CP, MV, and RM.
I. file copy command CP command format:
CP [-adfilprsu] source file (source) Destination File (destination) CP [Option] source1 source2 soure3... directory
Parameter description:
-A: Refers to archive, or copying all directories.
-D: if the source file is a link file, copy the properties of the connection file instead of the file itself.
-F: force. If you have repeated or other questions, you will not be asked.
-I: If the destination file (destination) already exists, the system will first ask if the operation is true during overwriting.
-L: Create a hard link connection file instead of copying the file itself.
-P: Copies the object property together, instead of using the default property.
-R: recursive replication for directory Replication
-S: copy it into a symbolic link, that is, a "shortcut" file.
-U: if the target file is older than the source file, update the target file. For example, copy file1 in the/test1 directory to the/test3 directory and change the file name to file2. Run the following command: CP/test1/file1/test3/file2
Ii. File movement command MV command format:
MV [-fiv] source destination
Parameter description:
-F: Force: move directly without asking
-I: If the destination file (destination) already exists, you will be asked whether to overwrite
-U: if the target file already exists and the source file is new, the file will be updated. For example, copy file1 under/test1 to the/test3 directory and change the file name to file2, run the following command: MV/test1/file1/test3/file2
Iii. File Deletion command RM command format:
Rm [FIR] file or directory
Parameter description:
-F: Force Delete-I: interactive mode. Before deletion, ask the user for operations.
-R: recursive deletion. You can run the following command to delete a file1 file in a directory such as/test: Rm-I/test/file1.