Linux中whatis與makewhatis的作用
在好久沒有和大家分享 Linux 命令方面的東東了,Linux 是一個以命令操作為主的系統,眾多的命令與其作用,要想都記住也不太現實。因此,用 man info whatis 等工具來查看命令的作用就很重要了。 Linux 中的 whatis 命令可以從它的字面意思可以看出來,就是“這是什么”,通過它可以知道某命令是用來干什么的,而且是用很簡短的方式來描述。
如果你是 RHEL 6 的最小化安裝,就沒有包含 man whatis 命令,你需要安裝 man 。whatis 可能大家會比較熟悉,但是 makewhatis 呢?其實 whatis 運行的結果是需要把命令的情況檢索到它的數據庫中的。對于還沒有這個數據庫的系統,就需要用 makewhatis 命令來讓系統立即檢索。否則系統將在一定的時候自動檢索。通過下面的命令運行的實例,大家就應該比較清楚地了解到這一點了。
[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
【編輯推薦】