The cp, rm, and mvcp (copy) commands of a linux command every day are 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. Cp-ifiled...
The cp, rm, and mv cp (copy) commands of a linux command every day are 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 requires confirmation before overwriting the file, but I will also confirm it if I do not write-I. So it is the same as cp. Www.2cto.com cp-r dir1 dir2 when you want to copy a directory, use-r to recursively copy 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. Rm (remove), mv (move) is similar to cp and will not be repeated. Author: CrazyNemo
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