To copy files, use the CP (copy) command. However, the CP command has many uses. In addition to simple replication, you can also create a connection file (that is, a shortcut), compare the new and old two files and update them, copy the entire
The CP command is more commonly used in Linux VPS operations and applications, and can be used to copy files or folders, rename a new file, and copy files to other paths for transfer.
Example usage:
1. Copy the itbulu.com.jpg file from the root
[Email protected] ~]#ls [-aadffhilnrrst] Directory name[Email protected] ~]#ls [--color={never,auto,always}] Directory name[Email protected] ~]#ls [--full-time] Directory nameOptions and Parameters:-a: All the files, together with the hidden files
CP Copy command ~CP (copy an archive or directory)[Root @ Linux ~] # Cp [-adfilprsu] Destination)[Root @ Linux ~] # Cp [Options] source1 source2 sourc4 .... DirectoryParameters:-A: equivalent to-PDR;-D: if the source file is a link file,
Cp (copy an archive or directory)[Root @ linux ~] # Cp [-adfilprsu] destination)[Root @ linux ~] # Cp [options] source1 source2 soure3... directoryParameters:-A: This option is usually used when copying directories. It retains links and file
Linux replicates all files in the specified directory to another directoryCopy all files in the specified directory to another directoryReplication of files and directories is often used. The command for replication under Linux is CP.Suppose the
Provides various official and user-released code examples. For code reference, you are welcome to learn how to copy files and folders using cp.
Command Name:
cp(copy)Function Description: copy one file to another, or copy several files to another
The cp command is used to copy files or directories. For example, if you specify more than two files or directories at the same time, and the final destination is an existing Directory, then it copies all the previously specified files or
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.