01-Linux命令【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


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM