Linux File Management CD

Source: Internet
Author: User

CD Switch Directory

Command English original intention

    • Change Directory
Command function
    • Name implies
Common options
Simplify Operations function
CD ~ or CD Go to the current user's home directory
CD- Go to last Directory
Cd.. Go to the top level directory
Cd. Go to current directory
Common examples

Switch between home directory and destination directory

[email protected]:~$ cd parent/child/[email protected]:~/parent/child$ cd ..[email protected]:~/parent$ cd -/home/whoami/parent/child[email protected]:~/parent/child$ cd -/home/whoami/parent[email protected]:~/parent$ cd ~[email protected]:~$ cd
Absolute path

With respect to absolute paths, simply the complete path starting with the root "/" directory, which is the end of the directory you want to go to, in the form of:

/usr/local/binA directory that represents a directory in the directory under the root directory usr local bin .

Relative path

Relative path, which is the path relative to your current directory, relative to the current directory. As the starting point, take the directory you want to the end, the manifestation of the form such as:

usr/local/bin(This assumes that the current directory is the root directory.) Indicates that the relative path does not actually include the one that represents the current directory, . but rather begins with the directory name, because this directory is a subdirectory usr of the / directory, which can be omitted, and if it is the . top level directory of the current directory, .. it is required For example, if your current directory is a home directory, the root directory should be represented as the ../../ top level directory (directory) of the previous level directory (home directory) / .

Linux File Management CD

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.