. Copy the file. The file is copied only when the source file is modified later than the target file.
CP-u-V file1 file2
. Copy file file1 to file file2
CP file1 file2
. Copy file file1 to file file2.
CP-I file1 file2
. Copy the file file1 to file2. Because the target file already exists, use the forced copy mode.
CP-F file1 file2
. Copy the directory dir1 to the directory dir2
CP-r file1 file2
. Copy the file file1, file2, file3, and directory dir1 to dir2.
CP-r file1 file2 file3 dir1 dir2
. File attributes are retained during replication.
CP-P a.txt tmp/
. The directory structure of the file is retained during replication.
CP-P/var/tmp/a.txt./temp/
. Backup files generated during replication
CP-B a.txt tmp/
. The backup file is generated during replication ~ 1 ~ Format
CP-B-V T a.txt/tmp
. Specifies the tail mark of the backup file
CP-B-S _ Bak a.txt/tmp