linuxpwd命令如何使用

這篇文章主要介紹“l(fā)inux pwd命令如何使用”的相關(guān)知識,小編通過實際案例向大家展示操作過程,操作方法簡單快捷,實用性強,希望這篇“l(fā)inux pwd命令如何使用”文章能幫助大家解決問題。

我們注重客戶提出的每個要求,我們充分考慮每一個細節(jié),我們積極的做好成都網(wǎng)站制作、成都網(wǎng)站設(shè)計服務(wù),我們努力開拓更好的視野,通過不懈的努力,成都創(chuàng)新互聯(lián)公司贏得了業(yè)內(nèi)的良好聲譽,這一切,也不斷的激勵著我們更好的服務(wù)客戶。 主要業(yè)務(wù):網(wǎng)站建設(shè),網(wǎng)站制作,網(wǎng)站設(shè)計,微信小程序定制開發(fā),網(wǎng)站開發(fā),技術(shù)開發(fā)實力,DIV+CSS,PHP及ASP,ASP.Net,SQL數(shù)據(jù)庫的技術(shù)開發(fā)工程師。

linux中用 pwd 命令來查看”當前工作目錄“的完整路徑。 簡單得說,每當你在終端進行操作時,你都會有一個當前工作目錄。
在不太確定當前位置時,就會使用pwd來判定當前目錄在文件系統(tǒng)內(nèi)的確切位置。

1.命令格式:
 pwd [選項]

2.命令功能:
 查看”當前工作目錄“的完整路徑

3.常用參數(shù):
一般情況下不帶任何參數(shù)
如果目錄是鏈接時:
格式:pwd -p  顯示出實際路徑,而非使用連接(link)路徑。

4.常用實例
       實例1:用 pwd 命令查看默認工作目錄的完整路徑
命令:
pwd
輸出:

復(fù)制代碼 代碼如下:

[root@localhost ~]# pwd
/root
[root@localhost ~]#

實例2:使用 pwd 命令查看指定文件夾
命令:
pwd

復(fù)制代碼 代碼如下:

[root@localhost ~]# cd /opt/soft/
[root@localhost soft]# pwd
/opt/soft
[root@localhost soft]#

 實例三:目錄連接鏈接時,pwd -p  顯示出實際路徑,而非使用連接(link)路徑;pwd顯示的是連接路徑
命令:
pwd -p

復(fù)制代碼 代碼如下:

[root@localhost soft]# cd /etc/init.d
[root@localhost init.d]# pwd
/etc/init.d
[root@localhost init.d]# pwd -p
/etc/rc.d/init.d
[root@localhost init.d]#

 實例4:/bin/pwd
命令:
/bin/pwd [選項]
選項:
-l 目錄連接鏈接時,輸出連接路徑
-p 輸出物理路徑
輸出:

復(fù)制代碼 代碼如下:

[root@localhost init.d]# /bin/pwd
/etc/rc.d/init.d
[root@localhost init.d]# /bin/pwd --help
[root@localhost init.d]# /bin/pwd -p
/etc/rc.d/init.d
[root@localhost init.d]# /bin/pwd -l
/etc/init.d
[root@localhost init.d]#

 實例五:當前目錄被刪除了,而pwd命令仍然顯示那個目錄

復(fù)制代碼 代碼如下:

[root@localhost init.d]# cd /opt/soft
[root@localhost soft]# mkdir removed
[root@localhost soft]# cd removed/
[root@localhost removed]# pwd
/opt/soft/removed
[root@localhost removed]# rm ../removed -rf
[root@localhost removed]# pwd
/opt/soft/removed
[root@localhost removed]# /bin/pwd
/bin/pwd: couldn't find directory entry in “..” with matching i-node
[root@localhost removed]# cd
[root@localhost ~]# pwd
/root
[root@localhost ~]#

關(guān)于“l(fā)inux pwd命令如何使用”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識,可以關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,小編每天都會為大家更新不同的知識點。

網(wǎng)站題目:linuxpwd命令如何使用
URL網(wǎng)址:http://muchs.cn/article34/piecpe.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制網(wǎng)站、軟件開發(fā)、動態(tài)網(wǎng)站、品牌網(wǎng)站設(shè)計、關(guān)鍵詞優(yōu)化、搜索引擎優(yōu)化

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)