One linux command per day cp

Source: Internet
Author: User
The cp (copy) command is mainly used to copy files or directories. Cp -- help allows you to view the usage of all its parameters. Cpfiledir: copy the file to the dir directory. An error is reported when the file is a directory. The parameter description of www.2cto. comcp-ifiledir is...
The cp (copy) command is mainly used to copy files or directories. Cp -- help allows you to view the usage of all its parameters. The following is a common example: cp file dir: copy a file to the dir directory. An error is reported when the file is a directory. The description of the cp-I file dir parameter at www.2cto.com requires confirmation before overwriting the file, but I will also confirm if I do not write-I. So it is the same as cp. When cp-r dir1 dir2 is used to copy a directory, it recursively copies the directory and all contents in the directory. Cp-f file dir is forcibly copied regardless of whether the target file exists. Cp file1 file2 dir copy file1 and file2 to dir. Use-r when the directory to be copied exists. Normal replication may change the file/directory permissions. you can use the-p parameter to maintain the original permissions. Author: CrazyNemo
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.