Linux Directory Operations Command CD

Source: Internet
Author: User

Linux Directory Operations Command CD new Linux operations, Common command directory

      • ADB command
        • Grammar
        • Options
        • Parameters
        • Instance

ADB command

The CD command is actually the abbreviation for the working directory, which changes the current working path. 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). In addition, the ~ is also expressed as the meaning of home directory, which represents the current directory, which represents the current directory location of the previous level directory.

Grammar

cd(选项)(参数)

Options
    • -P If the destination directory you want to switch to is a symbolic connection, switch directly to the destination directory that the symbolic connection is pointing to
    • -L If the destination directory that you want to switch is a symbolic connection, switch directly to the directory that the character connection name represents, not the destination directory that the symbolic connection points to.
    • -When only the "-" option is applied, the current working directory is switched to the directory represented by the environment variable "OLDPWD".
Parameters

The main parameter is the list of functions

Instance

1. Toggle absolute commands, such as switching to/usr/local

[[email protected] test]# [[email protected] test]# cd /usr/local[[email protected] local]# pwd/usr/local
    1. Switch to the previous directory.
[[email protected] local]# cd -/home/test[[email protected] test]# pwd/home/test[[email protected] test]# cd -/usr/local[[email protected] local]# pwd/usr/local
    1. Switch to Parent directory
[[email protected] local]# pwd/usr/local[[email protected] local]# cd ..[[email protected] usr]# pwd/usr
    1. Returns two tiers from the current directory to the Superior
    1. Returns the home directory of the current user
    1. Use the parameters of the previous command as CD parameters
[[email protected] mnt]# cd /tmp[[email protected] tmp]# cd !$cd /tmp

Linux Directory Operations Command 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.