whatis命令是用於查詢一個命令執行什麼功能,並將查詢結果打印到終端上。
whatis命令在用catman -w命令創建的數據庫中查找command參數指定的命令、系統調用、庫函數或特殊文件名。whatis命令顯示手冊部分的頁眉行。然後可以發出man命令以獲取附加的信息。whatis命令等同於使用man -f命令。
語法
whatis
實例
[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:使用手冊
whatis keyword
man # KEYWORD
SECTION:
NAME
SYNOPSIS
[ ] 可選, <> 必選, | 多選一 , {} 可選的內容, ...
...
控制命令:
Space 向後翻一頁, b向前翻一頁
Enter向後翻一行, k向前翻一行
Ctrl+d向後翻半屏, Ctrl+u向前翻半屏
q退出
#G :數字+G 跳到指定的某行 不加數字:跳至最後一行
/keyword 搜索某一個關鍵詞
?keyword 搜索某一個關鍵詞
n 查找下一個關鍵詞
N 查找上一個關鍵詞
基礎命令:pwd, cd, ls, echo, date, clock, cal, hwclock, cat, tac, file, type, tty, halt, poweroff, shutdown, reboot