Summary Linux command list
A Linux command that displays the full path of the current working directory location. "pwd" stands for "print working directory".
/home/hoge
$ pwd
/home/hoge
option | Description |
---|---|
-L | Display paths without considering symbolic links |
-P | Show the path to the entity of the symbolic link |
/home/hoge
#Check directory structure
$ ls -l
-rw-r--r-- 1 hoge hoge 11 Feb 24 17:11 hoge.txt
drwxr-xr-x 2 hoge hoge 4096 Feb 24 17:14 test
drwxr-xr-x 2 hoge hoge 4096 Feb 24 17:15 test2
lrwxr-xr-x 2 hoge hoge 4096 Feb 24 17:15 test_link -> test2
$ cd test_link
$ pwd -L
/home/hoge/test_link
/home/hoge
#Check directory structure
$ ls -l
-rw-r--r-- 1 hoge hoge 11 Feb 24 17:11 hoge.txt
drwxr-xr-x 2 hoge hoge 4096 Feb 24 17:14 test
drwxr-xr-x 2 hoge hoge 4096 Feb 24 17:15 test2
lrwxr-xr-x 2 hoge hoge 4096 Feb 24 17:15 test_link -> test2
$ cd test_link
$ pwd -P
/home/hoge/test2
pwd, mkdir, cd , cat, cp, ls, touch, less, mv, rm, ssh, man, ** Adding at any time **
We undertake various development and construction contracts and mentor work for beginners. If you are interested, please go to ** here **
Recommended Posts