Article Updated: 2020-03-08
Note: This article referring to man pwd manual, use and give examples.
Article Directory
First, the command cd
andpwd
1, Command Introduction
pwd
To view the current directory path.
cd
Command is used to change the current directory.
Note: cd
the system built-in command, if you man cd
find that shows the bash
content.
2, syntax
pwd [-L] [-P] [--help] [--version]
cd [-L|[-P [-e]]] [dir]
3, use the sample
4, pwd parameters
Short format | Long format | description |
---|---|---|
-L | - -logical | If you are coming from a symbolic link, the path where the symbolic link is displayed |
-P | - -physical | Whether it is not coming from a symbolic link, it shows the actual path (physical) of |
- -help | Displays help information about the command | |
- -version | View version command |
5, cd parameters
Short format | Explanation | description |
---|---|---|
No arguments | Equivalent cd ~ , switch to the current user's home directory |
|
~ or-- |
The top left of the keyboard tilde or minus two | Switch to the current user's home directory |
- |
Dash / minus sign | Switch to the last cd to directory |
.. |
Two points | Switch to the parent directory |
-L |
If the handover target is a symbolic link, is displayed进入的是逻辑上的符号链接目录 |
|
-P |
If the handover target is a symbolic link, is displayed进入的是实际指向的目录 |