每天一个linux命令(1):pwd命令

1、命令简介

pwd(print work directory 打印当前目录)命令以绝对路径的方式显示用户当前工作目录。

2、用法

pwd  [-LP]

3、选项

-L    --logical    当目录为连接路径时,显示连接路径
-P    --physical    显示实际物理路径,而非使用连接(link)路径

4、实例

1:显示当前目录所在路径 pwd
[root@cent6 ~]# pwd
/root

2:显示当前目录的物理路径 pwd –P
[root@cent6 ~]# cd /etc/init.d 
[root@cent6 init.d]# pwd -P
/etc/rc.d/init.d
3: 显示当前目录的连接路径:pwd -L
[root@cent6 init.d]# cd /etc/init.d 
[root@cent6 init.d]# pwd -L
/etc/init.d

posted on 2016-04-11 20:47  小强斋太  阅读(2183)  评论(0编辑  收藏  举报

导航