【Linux】一步一步学Linux——whatis命令(14)
生活随笔
收集整理的這篇文章主要介紹了
【Linux】一步一步学Linux——whatis命令(14)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
00. 目錄
文章目錄
- 00. 目錄
- 01. 命令概述
- 02. 命令格式
- 03. 常用選項
- 04. 參考示例
- 05. 附錄
01. 命令概述
whatis命令在一些特定的包含系統命令的簡短描述的數據庫文件里查找關鍵字,然后把結果送到標準輸出。 查找的內容必須完全匹配關鍵字的才會輸出。whatis數據庫文件是用/usr/sbin/makewhatis 命令建立的。
02. 命令格式
whatis [OPTION…] 關鍵詞…
03. 常用選項
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 version04. 參考示例
[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 ~]$如果需要重建這個命令相關信息的數據庫,執行以下命令:
[root@localhost ~]# makewhatis注意:Centos7.5暫時不支持該命令。
05. 附錄
參考:【Linux】一步一步學Linux系列教程匯總
總結
以上是生活随笔為你收集整理的【Linux】一步一步学Linux——whatis命令(14)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Linux】一步一步学Linux——m
- 下一篇: 【Linux】一步一步学Linux——w