commands for copying, moving, and deleting files in Linux are CP, MV, and RM.
1. File Replication command CP
Command Format: CP [-adfilprsu] source file (source) Destination)
CP [Option] source1 source2 sourc4... directory
parameter description:
-A: indicates the meaning of 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 there are duplicates or other questions, if the target file (destination) already exists, force copy does not ask the user.
-I: If the target file (destination) already exists, the system will first ask whether the operation is true during overwriting.
-l: create a hard link file, instead of copying the file itself
-P: copy the file with its properties, rather than using the default properties
-R: recursive copy, used for directory replication
-S: Copy to symbolic link, that is, a "shortcut" file
-u: if the target file is older than the source file, update the target file
if you copy file1 under/test1 to/test3 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, force direct movement without asking
-I: If the destination file (destination) already exists, it will ask whether to overwrite
-u: If the destination file already exists, the source file is updated.
if you copy file1 in the/test1 directory 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, often used in directory Deletion
To delete the file1 file under the/test directory, run the following command:
Rm-I/test/file1
From: http://www.lupaworld.com/home-space-do-blog-uid-408170-id-149537.html