whatis命令在一些特定的包含系統命令的簡短描述的數據庫文件里查找關鍵字,然后把結果送到標準輸出。 查找的內容必須完全匹配關鍵字的才會輸出。whatis數據庫文件是用/usr/sbin/makewhatis 命令建立的。
Usage: whatis [OPTION...] 關鍵詞...
-d, --debug 輸出調試信息
-v, --verbose 輸出詳細的警告信息
-r, --regex 把每個關鍵詞都當作正則表達式解讀
-w, --wildcard 關鍵詞里包含通配符
-l, --long 不要把輸出按終端寬度截斷
-C, --config-file=文件 使用該用戶設置文件
-L, --locale=區域 定義本次搜索所使用的區域設置
-m, --systems=系統 use manual pages from other systems
-M, --manpath=路徑 設置搜索手冊頁的路徑為“路徑”
-s, --sections=列表, --section=列表
search only these sections (colon-separated)
-?, --help give this help list
--usage give a short usage message
-V, --version print program version
[deng@localhost ~]$ whatis ls
ls (1) - 列目錄內容
ls (1p) - list directory contents
[deng@localhost ~]$ whatis cp
cp (1) - 復制文件和目錄
cp (1p) - copy files
[deng@localhost ~]$ whatis chown
chown (1) - 修改文件所有者和組別
chown (1p) - change the file ownership
chown (2) - change ownership of a file
chown (3p) - change owner and group of a file
[deng@localhost ~]$ whatis man
man (1) - 格式化并顯示在線幫助手冊頁
man (7) - 格式化手冊頁的宏
man (1p) - display system documentation
[deng@localhost ~]$