Linux Common BASIC commands CP Mv__linux

Source: Internet
Author: User

This blog will explain the CP command and MV Command.

Copy file: CP (copy copy)

The function of the CP command is to copy the given file or directory to another file or directory, equivalent to the Copy command under DOS.

Common options description.

Using: CP b.txt zhuangge/, copy b.txt files to the Zhuangge folder, and the results are as follows.

Using: Cp-r boge zhuangge/, move directory boge to directory Zhuangge below, remember to use the-r option, otherwise the operation failed, the result is as follows.


Moving files: MV (move moves)

Users can use the MV command to move files or directories, or to rename files or directories.

Common Options Description:

Use: MV A.txt a_rename.txt, the file name of a txt file named A_rename.txt, showing the results are as follows:

Using: MV A_rename.txt boge/, the file name A_rename.txt files are cut and copied to the Boge folder, showing the following results.


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.