Linux command--CD

Source: Internet
Author: User
Tags parent directory

CD command description

The CD command is used to switch the working directory to dirname. Where dirname notation can be either an absolute path or a relative path. If the directory name is omitted, it is transformed to the user's home directory (that is, the directory where login was first). Other than that~Also expressed as the meaning of home directory,.Is the directory where you are currently located,..Represents the previous level of directory at the current directory location.

Grammar
CD (options) (parameters)
Option description
-P If the destination directory you want to switch to is a symbolic link, switch directly to the destination directory that the symbolic link is pointing to. -L If the target directory that you want to switch is a link to a symbol, switch directly to the directory that the word linked name represents, not the destination directory to which the symbol points. -When only the "-" option is used, the current working directory is switched to the directory represented by the environment variable "OLDPWD".
Instance
CD into the user's home directory

650) this.width=650; "src=" Https://i.imgur.com/eWym0HT.gif "style=" Margin-top:0px;margin-right:0px;margin-bottom : 0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0 px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px; "alt=" EWym0HT.gif "/>

CD ~ Go to User home directory

650) this.width=650; "src=" Https://i.imgur.com/3QMZH0h.gif "style=" Margin-top:0px;margin-right:0px;margin-bottom : 0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0 px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px; "alt=" 3QMZH0h.gif "/>

CD-Returns the directory where it was before entering this directory

650) this.width=650; "src=" Https://i.imgur.com/gjCegc2.gif "style=" Margin-top:0px;margin-right:0px;margin-bottom : 0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0 px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px; "alt=" GjCegc2.gif "/>

Cd.. Return to the parent directory (if the current directory is "/", then "/"; "..." after execution) Indicates the meaning of the parent directory)

650) this.width=650; "src=" Https://i.imgur.com/cKRKit8.gif "style=" Margin-top:0px;margin-right:0px;margin-bottom : 0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0 px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px; "alt=" CKRKit8.gif "/>

Cd..    /.. Return to the top level two directory

650) this.width=650; "src=" Https://i.imgur.com/dm6vPxh.gif "style=" Margin-top:0px;margin-right:0px;margin-bottom : 0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0 px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px; "alt=" Dm6vPxh.gif "/>

CD!$ Use the parameters of the previous command as parameters of the CD command


This article is from the "wind and Rain Forest" blog, please make sure to keep this source http://fengyushanlin.blog.51cto.com/12092006/1978838

Linux command--CD

Related Article

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.