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

相关文章:

  • 2021-11-17
  • 2021-12-27
  • 2022-12-23
  • 2022-01-16
  • 2022-12-23
  • 2022-01-08
  • 2021-06-13
猜你喜欢
  • 2022-03-05
  • 2021-09-04
  • 2021-09-17
  • 2022-12-23
  • 2021-06-26
  • 2021-05-17
  • 2021-09-22
相关资源
相似解决方案