Linux_ Directory Management Commands

Source: Internet
Author: User

This blog post mainly describes the Linux system directory management commands, there are mkdir,rmdir,ls,cd,pwd,file,tree.

1, mkdir--Create a directory

Usage:

mkdir [Options] directory ...

Options

-M,--mode=mode: Define permissions for the directory

-P,--parents: When creating a directory, if the directory's parent directory does not exist, first create its parent directory, and then create subdirectories

-V,--verbose: Displays information for creating each directory

2, rmdir--Delete empty directory

Usage:

rmdir [options] directory ...    

Options

-P,--parents: When you delete a subdirectory, if the subdirectory is deleted, the stepfather directory is also empty, and its parent directory is also deleted

# rmdir-p/A/B/C

-V,--verbose: Displays information to delete each directory

3, CD--switch directory, is an internal command

Usage: CD [-l|-p] [dir]

-L: Switch to the symbolic link directory when switching directories

-P: Switch to physical directory structure when switching directories

# CD Switch to/

# CD-Switch to the previous directory

# CD ~username switch to the user's home directory

4. PWD--Show Current working directory

Usage: pwd [-LP]

-l| P with CD

5. File--Displays the document type

Simple usage: File FILENAME ...

6. Tree--List directory tree

7. LS--List the directory context

-L: Long message

-H: Do unit conversions

-I: The index node of the file

-A: Show hidden files, including (. And ...)

.: Current Directory

.: Parent directory of current directory

-A: Shows hidden files, but does not include. and.

-R: Reverse Display

-R: Recursive display

-D: Display the directory's own properties



Linux_ Directory Management commands

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.