Linux-CP command

Source: Internet
Author: User

. 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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.