TrumanWong

whatis

Query what function a command performs

Supplementary instructions

whatis command is used to query what function a command performs and print the query results to the terminal.

The whatis command searches for the command, system call, library function, or special file name specified by the command parameter in the database created with the catman -w command. The whatis command displays the header lines of the manual section. You can then issue the man command to obtain additional information. The whatis command is equivalent to using the man -f command.

grammar

whatis

Example

[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