Linux中whatis與makewhatis的作用
在好久沒(méi)有和大家分享 Linux 命令方面的東東了,Linux 是一個(gè)以命令操作為主的系統(tǒng),眾多的命令與其作用,要想都記住也不太現(xiàn)實(shí)。因此,用 man info whatis 等工具來(lái)查看命令的作用就很重要了。 Linux 中的 whatis 命令可以從它的字面意思可以看出來(lái),就是“這是什么”,通過(guò)它可以知道某命令是用來(lái)干什么的,而且是用很簡(jiǎn)短的方式來(lái)描述。
如果你是 RHEL 6 的最小化安裝,就沒(méi)有包含 man whatis 命令,你需要安裝 man 。whatis 可能大家會(huì)比較熟悉,但是 makewhatis 呢?其實(shí) whatis 運(yùn)行的結(jié)果是需要把命令的情況檢索到它的數(shù)據(jù)庫(kù)中的。對(duì)于還沒(méi)有這個(gè)數(shù)據(jù)庫(kù)的系統(tǒng),就需要用 makewhatis 命令來(lái)讓系統(tǒng)立即檢索。否則系統(tǒng)將在一定的時(shí)候自動(dòng)檢索。通過(guò)下面的命令運(yùn)行的實(shí)例,大家就應(yīng)該比較清楚地了解到這一點(diǎn)了。
[root@OwnLinux-server media]# whatis whatis whatis: nothing appropriate [root@OwnLinux-server media]# whatis makewhatis makewhatis: nothing appropriate [root@OwnLinux-server media]# whatis ls ls: nothing appropriate [root@OwnLinux-server media]# makewhatis [root@OwnLinux-server media]# whatis whatis whatis (1) – search the whatis database for complete words [root@OwnLinux-server media]# whatis makewhatis makewhatis (8) – Create the whatis database
原文連接:http://www.ownlinux.cn/2011/04/01/linux-whatis-makewhatis.html
【編輯推薦】