Operation of the Linux directory

Source: Internet
Author: User

First, the directory of the Switch command

   cd usr means switch to the USR directory in this directory

   CD.. / switch to the previous level directory

  CD/ switch to the system root directory

  CD ~ switch to user home directory

  CD- back to the previous layer

Second, the operation of the directory command

1. Add Directory Operations

Command: mkdir directory name

For example, create a test directory under the root directory: Mkdir/test

2. View Directory Operations

LS View file directory

Ls-a Show hidden files

Ls-l abbreviated LL displays detailed file information for the catalog file.

3. Find a Directory

Find Directory Parameters

Example: Find the catalog file associated with test/root under Find/root-name ' test* '

4. Modify the name of the directory

MV Directory name new directory name

Example: Renaming an AAA directory under the test directory to NEWTEST:MV AAA newtest

NOTE: The MV syntax can not only rename files, but also rename various file compression packages.

5. Location of the Mobile directory

The new location of the MV Directory name directory

6. Cut files

The new location of the MV Directory name directory

7. Copy Directory

Command: Cp-r directory name directory copy target location---------R for recursive copy

Example: Copy the newtest under/usr to test in the root directory cp-r/usr/newtest/test

Note: The CP can also be used for files, and the copy of the compressed package can now be used without the-R

8. Deleting a directory

RM-RF directory forced to delete files directory

Operation of the Linux 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.