Linux命令之whereis命令

2021-10-07 03:30:49 字數 859 閱讀 7300

一步一步學linux——whereis命令(15)

用法:

whereis [選項] 檔案

選項: -b 只搜尋二進位制檔案

-b 《目錄》 定義二進位制檔案查詢路徑

-m 只搜尋 man 手冊

-m 《目錄》 定義 man 手冊查詢路徑

-s 只搜尋源**

-s 《目錄》 定義源**查詢路徑

-f 終止 《目錄》 引數列表

-u 搜尋不常見記錄

-l 輸出有效查詢路徑

[root@localhost ~]# whereis  git

git: /usr/bin/git /usr/share/man/man1/git.1.gz

[root@localhost ~]# whereis -b git

git: /usr/bin/git

[root@localhost ~]# whereis -m git

git: /usr/share/man/man1/git.1.gz

[root@localhost ~]# whereis -s git

git:

[root@localhost ~]# whereis -u git

git: /usr/bin/git /usr/share/man/man1/git.1.gz

[root@localhost ~]# whereis -l git

bin: /usr/bin

bin: /usr/sbin

bin: /usr/lib

Linux基礎命令之whereis

whereis 查詢命令的位置,包括執行檔案 源 手冊檔案。此命令的適用範圍 redhat rhel ubuntu centos suse opensuse fedora。1 語法 whereis 選項 cmd whereis bmsu bms directory.f filename.2 選項列表...

linux命令之十七whereis 命令

whereis命令只能用於程式名的搜尋,而且只搜尋二進位制檔案 引數 b man說明檔案 引數 m 和源 檔案 引數 s 如果省略引數,則返回所有資訊。和find相比,whereis查詢的速度非常快,這是因為linux系統會將 系統內的所有檔案都記錄在乙個資料庫檔案中,當使用whereis和下面即將...

Linux命令分析 whereis

用途 用於定位命令的二進位制檔案,原始碼檔案和man說明檔案的路徑 用法 whereis bmsu bms 目錄.f 檔案.whereis命令通過查詢mlocate資料庫來定位檔案,故執行速度較快,該資料庫在centos下的路徑是 var lib mlocate mlocate.db,該資料庫用來記...