man Command Purpose Displays manual entries online. Syntax man { { -kKeyword | -fCommand } [ - ] [ -MPath ] [ Section ] | Title ...} Description The man command provides information on various reference arti- cles, such as commands, subroutines, and files. The man command can provide one-line descriptions of commands that are specified by name, or it can provide information on all commands whose descriptions contain a set of user-specified keywords. The man command formats a specified set of manual pages. If a section specifier is given, the man command searches in that sec- tion of the manual 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 one of the following: C Commands (including system management commands) F File-type manual pages L Library functions n New l Local o Old p Public 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 Commands, daemons 2 System calls, subroutines, kernel services, library routines, functions 3 System calls, subroutines, kernel services, library routines, functions 4 Files 5 Files 6 Commands, daemons 7 Files 8 Commands, daemons If the Section parameter is omitted, the man command searches all sections of the manual. In its search, the man command gives preference to commands over subroutines in system libraries, and prints the first section of the manual it finds, if any. The search path the man command uses is a list of directories separated by a : (colon) in which manual subdirectories can be found. If the environment variable MANPATH is set, its value is used for the default path. If a search path is supplied with the -k flag or the -f flag, it can be specified first. The MANPATH environment variable is not valid when reading the hypertext in- formation bases. The man command displays the manual pages from one of three places. First it searches the nroff directories (man?) under the /usr/share/man directory. Next it searches the formatted version directories (cat?) under the /usr/share/man directory. If the formatted version is available, and if it has a more recent modi- fy time than the nroff command source, it is promptly displayed. Otherwise, the manual page will be formatted with the nroff com- mand and displayed. If the user has permission, the formatted manual page will be deposited in the proper place, so that later invocations of the man command will not need to format the page again. Note: There is no nroff source for the supplied man pages; howev- er, source for additional man pages may be put into the man directories and will be located and processed by the man command. Third, if no manual page is found in the /usr/share/man/man or /usr/share/man/cat directory, the man command reads from the hy- pertext information bases, which reside in the /usr/lpp/info directory structure and contain the operating system documenta- tion. When reading from the hypertext databases, no manual pages are put in the /usr/share/man/cat directory structure. When accessing the hypertext information bases, the man command reads only a subset of the operating system documentation. If the minimal set of using, managing, and commands information is installed, the man command reads only this information base. Otherwise, the man command reads the information bases in the following list that you have installed: nav Navigation and help information aix Using, managing, and commands information prog Programming information graph Programming graphics and user interface information Note: If a man search returns no match found in database, try us- ing the search feature of your hypertext database. If the standard output is a teletype, or if the - (minus) flag is given, the man command pipes its output using the more command with the -s flag. This eliminates blank lines and stops after each page on 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 When the man command uses a hypertext database, it can retrieve several articles. Quitting from the more pager retrieves the next article. To terminate the entire man process, use a SIGINT (Ctrl-C). When specifying one of the Network Computing System library rou- tines that contains a $ (dollar) sign in its name, enter a \ (backslash) preceding the $ sign. Flags - Pipes the command output using the more command with the -s flag. -k Keyword Displays a one-line synopsis of each manual section whose listing in the keyword data base contains the keyword specified with the -k flag. To use the -k flag, a root user must have previously entered catman -w to create the /usr/share/man/whatis file. -f Command Locates manual sections related to the specified com- mand and prints out the keyword data base entries. To use the -f 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 following example shows a possible search: man -M/usr/share/man:/usr/share/man/local 1c ftp Note: The -M flag is not valid when the man command reads from the hypertext databases. Exit Status This command returns the following exit values: 0 Successful completion. >0 An error occurred. Examples 1. To obtain information about the grep command, enter: man grep 2. To obtain information about the rpc_$register library routine, enter: man rpc_\$register 3. To obtain all entries containing the filesystem keyword in the /usr/share/man/whatis keyword database, enter: man -k filesystem The output is equivalent to the apropos command. You receive output from the -k flag only when the /usr/share/man/whatis key- word data base already exists. 4. To display all entries from the keyword data base related to the specified ed command, enter: man -f ed The output is equivalent to the whatis command. You receive out- put from the -f flag only when the /usr/share/man/whatis keyword data base already exists. Implementation Specifics This command is part of Base Operating System (BOS) Runtime. Files /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. Related Information The apropos command, catman command, more command, whatis command, whereis command.