Linux command CP.

Source: Internet
Author: User

Examples
CP File1.txt Newdir

Copies the file1.txt in the current directory to the newdir subdirectory.

Cp/home/public_html/mylog.txt/home/public_html/backup/mylog.bak

Copies the file mylog.txt in the public_html directory into the public_html/backupdirectory as Mylog.bak.

Cp-u *.txt Newdir

Copy all files ending in. txt to the newdir directory, but only if the files does not already exist in T He new directory, or if the files being copied is newer.

Cp-r/home/hope/files/*  /home/hope/backup

Recursively copies all the files, directories, and subdirectories in the/home/hope/files directory into the Home/hope/backup directory.

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.