查詢一個命令執行什么功能
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 ~]# whatis cp
cp (1) - copy files and directories
cp (1p) - copy files
[root@localhost ~]# whatis chown
chown (1) - change file owner 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) - A set of documentation tools: man, apropos and whatis.
man-pages (rpm) - Man (manual) pages from the Linux Documentation Project.
man.config [man] (5) - configuration data for man