[Linux] Linux Learning Notes (5)-File and directory management

Source: Internet
Author: User

1.Linux directory structure is a tree structure, the topmost directory is the directory "/", the other directory by Mount can add it to the directory tree, by lifting the mount to remove them.

2. Absolute path and relative path

    • Absolute path notation: written by the root directory "/", for example:/usr/share/man this directory;
    • Relative path notation: not written by "/", for example, to be transferred from/usr/share/man to/usr/share/doc, can be written as: CD. /doc. However, it is worth noting that if I want to jump from the directory "/" to "/usr/share/man", directly written: CD. /man is not going to work. Such as:

3. Common file and Directory management commands

    • LS: List directory
    • CD (change directory): Switch directory
    • PWD (Print working directory): Displays the directory where you are currently located

    • mkdir (Make directory): Create a new directory
[[email protected] Desktop] # Mkdir/lijiaman/         * ERROR notation */[[email protected] Desktop]#  lscmd  new file  new File~[root@linuxforlijiaman Desktop]#  mkdir lijiaman/          * correct notation */[[email protected] Desktop ]#  lscmd  lijiaman  new file  new file~
    • RmDir: Delete Empty directory
[[email protected] Desktop] # ls cmd  lijiaman  new file  new File~[root@linuxforlijiaman Desktop]#  rmdir Lijiaman [[email protected] Desktop]#  lscmd  new file  new file~
    • CP: Copying Files and directories
    • RM: Removing Files and directories
    • MV: Moving files and directories

[Linux] Linux Learning Notes (5)-File and directory management

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.