Linux Command Encyclopedia file management: CP

Source: Internet
Author: User
Keywords Linux file management command encyclopedia
Tags aliyun backup command encyclopedia copy directory file file management files

Function Description: Copy files or directories. &http://www.aliyun.com/zixun/aggregation/37954.html ">NBSP;

Syntax: CP [-abdfilpprrsuvx][-s < backup word tail string >][-v < Backup mode >][--help][--spares=< use time >][--version][source file or directory [ destination file or directory] [destination directory]

Supplemental Note: The CP directive is used to copy files or directories, such as specifying more than two files or directories, and the last destination is an existing directory, which copies all the files or directories previously specified to the directory. If you specify multiple files or directories at the same time, and the last destination is not an existing directory, an error message appears.

Parameters:
-A or--archive the effect of this parameter is the same as specifying the "-DPR" parameter.
-B or--backup deletes, overwriting the backup before the target file, and the backup file adds a backup string at the end of the word.
-D or--no-dereference when a symbolic connection is copied, the target file or directory is also established as a symbolic connection and points to the original file or directory that is connected to the source file or directory.
-F or--force forcibly copies a file or directory, regardless of whether the destination file or directory already exists.
-I or--interactive ask the user before overwriting the existing file.
-L or--link a hard connection to the source file, not a copy of the file.
-P or--preserve preserves the properties of the source file or directory.
-P or--parents preserves the path of the source file or directory.
-R recursively processes the files in the specified directory with the subdirectories.
-R or--recursive recursion to handle all files in the specified directory with subdirectories.
-S or--symbolic-link a symbolic connection to the source file, not a copy of the file.
-s< backup Word tail string > or--suffix=< backup tail string > After the target file is backed up with the "-B" parameter, the end of the backup file is added with a backup string, and the preset backup word tail string is the symbol "~".
-U or--update Use this parameter to copy the file only when the source file is changed more than the target file is updated or if the name corresponds to the target file.
The-V or--verbose displays the instruction execution process.
-v< Backup mode > or--version-control=< backup method > Back up the destination file with the "-B" parameter, the end of the backup file is added with a backup string, which can be changed not only with the "-S" parameter, but also with "-V" parameter specifies different backup methods, a backup string is also generated at the end of a different word.
A file system that is stored by-X or--one-file-system copied files or directories must be the same as the file system in which the CP directive is executed, otherwise it will not be replicated.
--help online Help.
--sparse=< Use time > Set the time to save sparse files.
--version Displays version information.

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.