Linux基本命令108將
阿新 • • 發佈:2018-11-04
1.pwd
Print the current working directory. With the -P option, pwd prints
the physical directory, without any symbolic links; the -L option
makes pwd follow symbolic links.
通常進入系統後,往往想知道自己當前位置,因此pwd就派上用場了,使用時注意一下-L,-P的區別,-P選項會顯示物理路徑。
下面的例子,體會一下,學會了嗎?
mengxialeideMBP:~ mengxianglei$ ls -ld /etc lrwxr[email protected] 1 root wheel 11 12 2 2017 /etc -> private/etc mengxialeideMBP:~ mengxianglei$ cd /etc mengxialeideMBP:etc mengxianglei$ pwd /etc mengxialeideMBP:etc mengxianglei$ pwd -L /etc mengxialeideMBP:etc mengxianglei$ pwd-P /private/etc