Linux基本命令108将

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-xr-x@ 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

 

 

猜你喜欢

转载自www.cnblogs.com/vmxl/p/9902934.html