Linux whatis命令的使用方法
01. 命令概述
whatis命令在一些特定的包含系統(tǒng)命令的簡(jiǎn)短描述的數(shù)據(jù)庫(kù)文件里查找關(guān)鍵字,然后把結(jié)果送到標(biāo)準(zhǔn)輸出。 查找的內(nèi)容必須完全匹配關(guān)鍵字的才會(huì)輸出。whatis數(shù)據(jù)庫(kù)文件是用/usr/sbin/makewhatis 命令建立的。
02. 命令格式
whatis [OPTION…] 關(guān)鍵詞…
03. 常用選項(xiàng)
Usage: whatis [OPTION...] 關(guān)鍵詞...
-d, --debug 輸出調(diào)試信息
-v, --verbose 輸出詳細(xì)的警告信息
-r, --regex 把每個(gè)關(guān)鍵詞都當(dāng)作正則表達(dá)式解讀
-w, --wildcard 關(guān)鍵詞里包含通配符
-l, --long 不要把輸出按終端寬度截?cái)? -C, --config-file=文件 使用該用戶設(shè)置文件
-L, --locale=區(qū)域 定義本次搜索所使用的區(qū)域設(shè)置
-m, --systems=系統(tǒng) use manual pages from other systems
-M, --manpath=路徑 設(shè)置搜索手冊(cè)頁(yè)的路徑為“路徑”
-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
04. 參考示例
[deng@localhost ~]$ whatis ls ls (1) - 列目錄內(nèi)容 ls (1p) - list directory contents [deng@localhost ~]$ whatis cp cp (1) - 復(fù)制文件和目錄 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) - 格式化并顯示在線幫助手冊(cè)頁(yè) man (7) - 格式化手冊(cè)頁(yè)的宏 man (1p) - display system documentation [deng@localhost ~]$
如果需要重建這個(gè)命令相關(guān)信息的數(shù)據(jù)庫(kù),執(zhí)行以下命令:
[root@localhost ~]# makewhatis
注意:Centos7.5暫時(shí)不支持該命令。
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持本站。
版權(quán)聲明:本站文章來源標(biāo)注為YINGSOO的內(nèi)容版權(quán)均為本站所有,歡迎引用、轉(zhuǎn)載,請(qǐng)保持原文完整并注明來源及原文鏈接。禁止復(fù)制或仿造本網(wǎng)站,禁止在非maisonbaluchon.cn所屬的服務(wù)器上建立鏡像,否則將依法追究法律責(zé)任。本站部分內(nèi)容來源于網(wǎng)友推薦、互聯(lián)網(wǎng)收集整理而來,僅供學(xué)習(xí)參考,不代表本站立場(chǎng),如有內(nèi)容涉嫌侵權(quán),請(qǐng)聯(lián)系alex-e#qq.com處理。
關(guān)注官方微信