網站首頁 學習教育 IT科技 金融知識 旅遊規劃 生活小知識 家鄉美食 養生小知識 健身運動 美容百科 遊戲知識 綜合知識
當前位置:趣知科普吧 > IT科技 > 

搜尋檔案夾|linux

欄目: IT科技 / 發佈於: / 人氣:1.64W

品牌型號:Thinkpad E15

系統版本:centos7

1、使用find命令,要在Linux中搜尋檔案夾,我們需要用到-type參數。

linux 搜尋檔案夾

例:在系統中搜尋ssh檔案夾,輸入命令:

# find / -type d -iname "ssh"

linux 搜尋檔案夾 第2張

2、也可以使用locate命令。

linux 搜尋檔案夾 第3張

例:在系統中搜尋ssh檔案夾,輸入命令:

# locate --basename 'ssh'

linux 搜尋檔案夾 第4張

總結:

1、使用find命令。

例:在系統中搜尋ssh檔案夾,輸入命令:

# find / -type d -iname "ssh"

2、使用locate命令。

例:在系統中搜尋ssh檔案夾,輸入命令:

# locate --basename 'ssh'

Tags:linux 檔案夾