whatis命令是用于查詢一個(gè)命令執(zhí)行什么功能广恢,并將查詢結(jié)果打印到終端上唯卖。
whatis命令在用catman -w命令創(chuàng)建的數(shù)據(jù)庫中查找command參數(shù)指定的命令山橄、系統(tǒng)調(diào)用漓拾、庫函數(shù)或特殊文件名壳影。whatis命令顯示手冊(cè)部分的頁眉行。然后可以發(fā)出man命令以獲取附加的信息肥荔。whatis命令等同于使用man -f命令绿渣。
語法
whatis
實(shí)例
[root@localhost ~]# whatis ?ls
ls?????????????????? (1)? - list directory contents
ls?????????????????? (1p)? - list directory contents
[root@localhost ~]# whatiscp
cp?????????????????? (1)? - copy files and directories
cp?????????????????? (1p)? - copy files
[root@localhost ~]# whatischown
chown??????????? ????(1)? - changefileowner and group
chown??????????????? (1p)? - change the file ownership
chown??????????????? (2)? - change ownership of a file
chown??????????????? (3p)? - change owner and group of a file
[root@localhost ~]# whatis man
man????????????????? (1)? - format and display the on-line manual pages
man????????????????? (1p)? - display system documentation
man????????????????? (7)? - macros to format man pages
man???????????? ????(rpm) - Asetof documentation tools: man,aproposand whatis.
man-pages?????????? (rpm) - Man (manual) pages from the Linux Documentation Project.
man.config [man]???? (5)? - configuration data for man
#922~944
manual:使用手冊(cè)
whatis keyword
man # KEYWORD
SECTION:
NAME
SYNOPSIS
[ ] 可選, ? ? ?<> 必選, ? ?| ?多選一 ?, ? {} 可選的內(nèi)容, ...
...
控制命令:
Space ?向后翻一頁, ?b向前翻一頁
Enter向后翻一行, k向前翻一行
Ctrl+d向后翻半屏, Ctrl+u向前翻半屏
q退出
#G ?:數(shù)字+G ? 跳到指定的某行 ? ? ?不加數(shù)字:跳至最后一行
/keyword ? ?搜索某一個(gè)關(guān)鍵詞
?keyword ?搜索某一個(gè)關(guān)鍵詞
? ? ? ? ? ? ? ? ?n ? ?查找下一個(gè)關(guān)鍵詞
? ? ? ? ? ? ? ? ?N ??查找上一個(gè)關(guān)鍵詞
基礎(chǔ)命令:pwd, cd, ls, echo, date, clock, cal, hwclock, cat, tac, file, type, tty, halt, poweroff, shutdown, reboot