Linux command: CP

Source: Internet
Author: User

1, Command introduction:

The CP is used to copy files or directories, and the name is copy

2. Command format:

CP [OPTION] [-t] source purpose

or CP [options] Source directory

or CP [option]-T directory source

3. Command parameters:

-A,--archive equals-dr--preserve=all

--backup[=control Create a backup for each existing target file

-B similar to--backup but does not accept parameters

--copy-contents in recursive processing is to copy special file contents

-D equals--no-dereference--preserve=links

-F,--force if the destination file cannot be opened, remove it and try again (when the-n option

There is no need to select this option)

-I,--interactive before overwriting (invalidates the previous-n option)

-H follow the command-line symbolic link in the source file

-L,--link link files without copying

-L,--dereference always follow the symbolic link

-N,--no-clobber do not overwrite existing files (invalidates the previous-i option)

-P,--no-dereference does not follow the symbolic link in the source file

-P equals--preserve= mode, ownership, timestamp

The--preserve[= property list retains the specified property (default: Mode, ownership, timestamp), if

May keep attached properties: environment, links, xattr, etc.

-R,-R,--recursive copy all items in directory and directory

Linux command: CP

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.