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
- 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
- Switch to Parent directory
[[email protected] local]# pwd/usr/local[[email protected] local]# cd ..[[email protected] usr]# pwd/usr
- Returns two tiers from the current directory to the Superior
- Returns the home directory of the current user
- 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