一 簡介
whereis:查找一個二進制、源代碼和手動頁面檔案。
二 指令格式
whereis [參數] [目錄] 檔案名
三 常用參數
-b 僅顯示二進制檔案
-B 隻在設定的目錄下查找二進制檔案
-m 僅顯示說明檔案
-M<目錄> 隻在設定的目錄下找說明檔案
-s 隻查找原始代碼檔案
-S 隻在設定的目錄下查找原始代碼檔案
-u 查找包含制定類型的檔案。
四 常用例子
1 查找含有cp的檔案
[[email protected]~]# whereis cp
cp: /bin/cp /usr/share/man/man1p/cp.1p.gz/usr/share/man/man1/cp.1.gz
2 查找含有cp的二進制檔案
[[email protected]~]# whereis -b cp
cp: /bin/cp
3 查找含有cp字元的檔案名的文檔
[[email protected]~]# whereis -m cp
cp: /usr/share/man/man1p/cp.1p.gz/usr/share/man/man1/cp.1.gz