Displays manual entries online.
man [ [ [ -c ] [ -t ] [ Section ] ] | [ -k | -f ] ] [ -MPath ] [ -r ] Title ...
The man command provides reference information on topics, such as commands, subroutines, and files. The man command provides one-line descriptions of commands specified by name. The man command also provides information on all commands whose descriptions contain a set of user-specified keywords.
The man command formats a specified set of manual pages. If you specify a section for the Section parameter, the man command searches in that section of the manual pages for the title specified by the Title parameter. The value of the Section parameter can be either an Arabic number from 1 through 8 or a letter.
The Section letters are:
|C||Specifies commands (including system management commands).|
|F||Specifies file-type manual pages.|
|L||Specifies library functions.|
Note: The n, l, o, and p section specifiers are not valid for reading the hypertext information bases, which contain the operating system documentation.
The Section numbers are:
|1||Indicates user commands and daemons.|
|2||Indicates system calls and kernel services.|
|4||Indicates special files, device drivers, and hardware.|
|5||Indicates configuration files.|
|7||Indicates miscellaneous commands.|
|8||Indicates administrative commands and daemons.|
Note: The operating system documentation in the hypertext information databases is grouped into three sections only: command manual pages (in section 1, equivalent to section C), subroutine manual pages (in section 3, equivalent to section L), and file manual pages (in section 4, equivalent to section F). When searching for hypertext information, specifying section 1, 6, 7, or 8 will default to the command manual pages, section 2 or 3 will default to the subroutine manual pages, and section 4 or 5 will default to the file manual pages.
If the Section parameter is omitted, the man command searches all sections of the manual.
The search path the man command uses is a list of directories separated by a : (colon) in which manual subdirectories can be found. The MANPATH environment variable value is used for the default path. The MANPATH environment variable is not valid when reading the hypertext information bases.
The man command displays the manual pages as follows:
Note: There is no nroff source for the supplied manual pages. However, you can put nroff source for manual pages into the man directories and the man command can locate and process the nroff source.
When accessing the HTML databases, man looks for the operating
system library before it proceeds to other LPP libraries. Within these
libraries, it processes information in the following order:
|libs||Subroutines, System Calls|
If the standard output is a tty, the man command pipes its output using the more command with the -s and -v flags. The -s flag eliminates multiple blank lines and stops after each page on the screen. The -v flag suppresses the display of nonprinting characters to the screen. To continue scrolling, press the space bar. To scroll an additional 11 lines when the output stops, press the Ctrl-D key sequence.
The PAGER environment variable can be set to whatever pager is desired. The default value is the more command. To change the default pager, enter:
PAGER=Somepager export PAGER
For example, if there are customized manual pages which are formatted with reverse or fractional line feeds, the PAGER environment variable may be set to /usr/bin/pg so that the line feeds are not printed as control characters. This procedure is not necessary for the manual pages.
When the man command uses a hypertext database, it can retrieve several articles. For example, man open displays several articles. The use of SIGINT (Ctrl-C) exits the man command completely. On the other hand, man open close also displays several articles but the use of SIGINT (Ctrl-C) causes man to display the close command information instead of exiting. Using SIGINT (Ctrl-C) again exits the man command completely.
When specifying one of the Network Computing System library routines that contains a $ (dollar sign) in its name, enter a \ (backslash) preceding the $.
|-c||Displays the manual information using the cat command.|
|-f||Displays entries in the keyword database related only to the command name given as the final parameter. You can enter more than one command name, each separated by a space. Use this flag to search for command articles only. To use the -f flag, a root user must have previously entered catman -w to create the /usr/share/man/whatis file.|
|-k||Displays each line in the keyword database that contains a string of characters matching the title given as the final parameter. You can enter more than one title, each separated by a space. To use the -k flag, a root user must have previously entered catman -w to create the /usr/share/man/whatis file.|
|-MPath||Changes the standard location where the man command searches
for manual information. The search path the man command uses
is a list of directories separated by a : (colon) in which manual
subdirectories can be found. The MANPATH environment
variable value is used for the default path.
Note: The -M flag is not valid when the man command reads from the hypertext databases.
|-r||Searches remotely for the manual information. If for any reason
(either the remote machine is not reachable, or there is a problem reading URL
or the java is not installed on the local machine, etc) the remote search
fails, then man performs a local search for the requested man
Note: The environment variable DOCUMENT_SERVER_MACHINE_NAME must be set to the remote machine, where the man pages reside.
|-t||Formats the manual information using the troff command. This flag is ignored if the manual page is found in a hypertext information base.|
This command returns the following
|>0||An error occurred.|
man -k mkdir
The output is equivalent to the apropos command. You receive output from the -k flag only when the /usr/share/man/whatis keyword database already exists.
man -f nroff troff
The output is equivalent to the whatis command. You receive output from the -f flag only when the /usr/share/man/whatis keyword database already exists.
man -M/usr/share/man:/usr/share/man/local ftp
|/usr/bin/man||Contains the man command.|
|/usr/share/man||Standard manual directory structure.|
|/usr/share/man/cat?/*||Directory containing preformatted pages.|
|/usr/share/man/whatis||Contains the keyword database.|
|/usr/share/man/man?/*||Directory containing nroff format manual pages.|
The apropos command, catman command, more command, whatis command, whereis command.