Linux Command Learning Series 9-directory-related operations CD,MKDIR,RMDIR,CP

Source: Internet
Author: User
Tags create directory touch command
Previous section review:

1. Create a file: Touch command

2. Delete Files: RM command

3. Moving files: MV command

4. View files: Cat,head,tail command

Job: Create file Test.txt in root directory, create directory Test (command is mkdir), move test.txt to test directory, and rename to Test.doc

Touch Test.txt

mkdir test

MV Test.txt/test

Mv/test/test.txt/test/test.doc

The content of this section:

Related Operations for Directories

1. Enter directory: cd command

Common commands, how to use, CD directories

2. Create directory: mkdir command

Commonly used commands, how to: mkdir Directory

3. Delete directory: RmDir and RM

The RM command has been said in the previous section, RmDir effect and rm–df use method one to, that is, can only delete empty directory, delete non-empty directory, please use RM-DFR

4. File and directory replication: CP

The CP command is similar to the MV command, copying a file to a directory:

To copy a directory to another directory, you need to add the-R parameter:

Jobs: Create a directory test1,test2, create a test1.txt file in Test1, and then copy the Test1.txt file to the Test2 folder


Video material, follow the public number "kick genius"

Linux Command Learning Series 9-directory-related operations CD,MKDIR,RMDIR,CP

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.