Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

man(1) [aix man page]

Commands Reference, Volume 3, i - m

man_Command

  Purpose

   Displays manual entries online.

  Syntax

   man [ [ [ -c ] [ -t ] [ Section ] ] | [ -k | -f ] ] [ -F ]
   [ -m ] [ -MPath ] [ -r ] [ -a ] Title ...

  Description

   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 Ti-
tle
   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 com-
mands).
   F	    Specifies file-type manual pages.
   L	    Specifies library functions.
   n	    Specifies new.
   l	    Specifies local.
   o	    Specifies old.
   p	    Specifies public.

   Note:
   The n, l, o, and p section specifiers are not valid for  read-
ing the
   hypertext  information bases, which contain the operating sys-
tem
   documentation.

   The Section numbers are:

   1	      Indicates user commands and daemons.
   2	      Indicates system calls and kernel services.
   3	      Indicates subroutines.
   4	      Indicates special files, device drivers, and  hard-
ware.
   5	      Indicates configuration files.
   6	      Indicates games.
   7	      Indicates miscellaneous commands.
   8	      Indicates administrative commands and daemons.

   Note:
   The	operating  system documentation in the hypertext informa-
tion 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, spec-
ifying
   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: 1. The man command searches the nroff directories (man?) un- der the /usr/share/man directory. 2. The man command searches the formatted version directories (cat?) under the /usr/share/man directory. If the formatted ver- sion is available, and if it has a more recent modify time than the nroff command source, the man command displays the formatted version. Otherwise, the manual page is formatted with the nroff command and displayed. If the user has permission, the formatted manu- al page is deposited in the proper place, so that later invocations of the man command do not format the page again. Note: There is no nroff source for the supplied manual pages. However, you can put nroff source for manual pages into the man direc- tories and the man command can locate and process the nroff source. 3. If the man command does not find a manual page in the /usr/share/man/man or /usr/share/man/cat directory, the man command searches the paths specified through -M option or MANPATH environment variable for nroff directories (man?) and formatted ver- sion directories (cat?). 4. If the man command does not find a manual page in the /usr/share/man/man or /usr/share/man/cat or the user-spec- ified man/cat directory, the man command reads from the hypertext infor- mation bases. The hypertext information bases reside in the /usr/share/man/info directory structure and contain the operating system docu- mentation. When reading from the hypertext databases, the man command does not put any manual pages in the /usr/share/man/cat directory structure. The man command converts the HTML file into a formatted text file to fit on the display, and displays the manual page using the command described by the PAGER environment variable. 5. If the man command does not find a manual page in hyper- text information bases reside in the /usr/share/man/info direc- tory structure, then it looks for user-specified hypertext in- formation base (through -M or MANPATH). The user-defined hypertext infor- mation base, should follow the following directory structure: BasePath[/%{ L | l }]/DocLibraryname/Section/com- mand_or_routine_or_filename.htm Where: * %L represents the ISO language notation specified us- ing the LC_MESSAGES, %l represents the first 2 characters of the ISO language notation specified using the LC_MESSAGES. For example, for LC_MESSAGES=en_US the documents can be placed in Path/en_US or Path/en. * DocLibraryname represents the name of the documenta- tion library. * Section represents the section name, which must be one of the following: * cmds -- Represents Commands Section * libs -- Represents Library Section * files -- Represents Files Section Note: If -m option is specified, then the search for manual pages will be done only in the order of paths specified through -M or the MANPATH environment variable. 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: cmds Commands Reference libs Subroutines, System Calls files Files Reference 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 elimi- nates 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 addi- tional 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 vari- able 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 re- trieve 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 SIG- INT (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 $. Flags -a Display all matching entries. -c Displays the manual information using the cat command. Displays entries in the keyword database related only to the command name given as the final parameter. You can en- ter more than -f 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. -F Display only the first matching entry. Displays each line in the keyword database that con- tains a string of characters matching the title given as the final pa- rameter. You -k 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. -m Only search in the paths specified in MANPATH or -M. Changes the standard location where the man command searches for manual information. The path is a colon-separated list of paths, where the following special symbols can be used: -MPath * %D - The default AIX^(R) paths for man pages. * %L - A locale-specific directory location corre- sponding to the LC_MESSAGES category of the current locale. * %l - A locale-specific directory location corre- sponding to the first 2 characters of the LC_MESSAGES category of the current. Searches remotely for the manual information. If for any reason the remote search fails, then man performs a local search for the requested man page. Any of the following conditions can cause the remote search to fail: * The remote machine is not reachable. * There is a problem reading the URL. * Java^(TM) is not installed or it is not found in the user's search path, specified in the PATH environment variable. -r Note: The DOCUMENT_SERVER_MACHINE_NAME environment variable should be set to the name of the documentation search server machine the user wants to use. If the AIX Base Documentation is not sup- ported for the host's locale, the man command searches for the documentation for an alternate locale. If the search is successful, the documentation page is displayed after conversion to the local host's locale. If the alternate locale is not installed on the local host, the man command fails to display the docu- mentation page. Formats the manual information using the troff command. This flag -t is ignored if the manual page is found in a hypertext information base. Exit Status This command returns the following exit values: 0 Successful completion. >0 An error occurred. Examples 1. To display information about the grep command, enter: man grep 2. To display information about the rpc_$register library routine, enter: man rpc_egister 3. To display all entries in the /usr/share/man/whatis key- word database that contain the "mkdir" string , enter: man -k mkdir The output is equivalent to the apropos command. You re- ceive output from the -k flag only when the /usr/share/man/whatis key- word database already exists. 4. To display all entries from the keyword database related to the nroff and troff commands, enter: man -f nroff troff The output is equivalent to the whatis command. You re- ceive output from the -f flag only when the /usr/share/man/whatis key- word database already exists. 5. To display all ftp command related articles in the /usr/share/man or /usr/share/man/local path, enter: man -M/usr/share/man:/usr/share/man/local ftp 6. To display all matching entries, type the following: man -a Title 7. To display only the first matching entry, type the follow- ing: man -F Title 8. To search only in the paths specified in MANPATH or -M, type the following: man -m -M PATH Title 9. To search in the user-defined PATH, type the following: man -M PATH Title 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. ________________________________________________________________________________ Commands Reference, Volume 3, i - m man_Command Purpose Displays manual entries online. Syntax man [ [ [ -c ] [ -t ] [ Section ] ] | [ -k | -f ] ] [ -F ] [ -m ] [ -MPath ] [ -r ] [ -a ] Title ... Description 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 Ti- tle 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 com- mands). F Specifies file-type manual pages. L Specifies library functions. n Specifies new. l Specifies local. o Specifies old. p Specifies public. Note: The n, l, o, and p section specifiers are not valid for read- ing the hypertext information bases, which contain the operating sys- tem documentation. The Section numbers are: 1 Indicates user commands and daemons. 2 Indicates system calls and kernel services. 3 Indicates subroutines. 4 Indicates special files, device drivers, and hard- ware. 5 Indicates configuration files. 6 Indicates games. 7 Indicates miscellaneous commands. 8 Indicates administrative commands and daemons. Note: The operating system documentation in the hypertext informa- tion 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, spec- ifying 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: 1. The man command searches the nroff directories (man?) un- der the /usr/share/man directory. 2. The man command searches the formatted version directories (cat?) under the /usr/share/man directory. If the formatted ver- sion is available, and if it has a more recent modify time than the nroff command source, the man command displays the formatted version. Otherwise, the manual page is formatted with the nroff command and displayed. If the user has permission, the formatted manu- al page is deposited in the proper place, so that later invocations of the man command do not format the page again. Note: There is no nroff source for the supplied manual pages. However, you can put nroff source for manual pages into the man direc- tories and the man command can locate and process the nroff source. 3. If the man command does not find a manual page in the /usr/share/man/man or /usr/share/man/cat directory, the man command searches the paths specified through -M option or MANPATH environment variable for nroff directories (man?) and formatted ver- sion directories (cat?). 4. If the man command does not find a manual page in the /usr/share/man/man or /usr/share/man/cat or the user-spec- ified man/cat directory, the man command reads from the hypertext infor- mation bases. The hypertext information bases reside in the /usr/share/man/info directory structure and contain the operating system docu- mentation. When reading from the hypertext databases, the man command does not put any manual pages in the /usr/share/man/cat directory structure. The man command converts the HTML file into a formatted text file to fit on the display, and displays the manual page using the command described by the PAGER environment variable. 5. If the man command does not find a manual page in hyper- text information bases reside in the /usr/share/man/info direc- tory structure, then it looks for user-specified hypertext in- formation base (through -M or MANPATH). The user-defined hypertext infor- mation base, should follow the following directory structure: BasePath[/%{ L | l }]/DocLibraryname/Section/com- mand_or_routine_or_filename.htm Where: * %L represents the ISO language notation specified us- ing the LC_MESSAGES, %l represents the first 2 characters of the ISO language notation specified using the LC_MESSAGES. For example, for LC_MESSAGES=en_US the documents can be placed in Path/en_US or Path/en. * DocLibraryname represents the name of the documenta- tion library. * Section represents the section name, which must be one of the following: * cmds -- Represents Commands Section * libs -- Represents Library Section * files -- Represents Files Section Note: If -m option is specified, then the search for manual pages will be done only in the order of paths specified through -M or the MANPATH environment variable. 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: cmds Commands Reference libs Subroutines, System Calls files Files Reference 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 elimi- nates 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 addi- tional 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 vari- able 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 re- trieve 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 SIG- INT (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 $. Flags -a Display all matching entries. -c Displays the manual information using the cat command. Displays entries in the keyword database related only to the command name given as the final parameter. You can en- ter more than -f 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. -F Display only the first matching entry. Displays each line in the keyword database that con- tains a string of characters matching the title given as the final pa- rameter. You -k 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. -m Only search in the paths specified in MANPATH or -M. Changes the standard location where the man command searches for manual information. The path is a colon-separated list of paths, where the following special symbols can be used: -MPath * %D - The default AIX^(R) paths for man pages. * %L - A locale-specific directory location corre- sponding to the LC_MESSAGES category of the current locale. * %l - A locale-specific directory location corre- sponding to the first 2 characters of the LC_MESSAGES category of the current. Searches remotely for the manual information. If for any reason the remote search fails, then man performs a local search for the requested man page. Any of the following conditions can cause the remote search to fail: * The remote machine is not reachable. * There is a problem reading the URL. * Java^(TM) is not installed or it is not found in the user's search path, specified in the PATH environment variable. -r Note: The DOCUMENT_SERVER_MACHINE_NAME environment variable should be set to the name of the documentation search server machine the user wants to use. If the AIX Base Documentation is not sup- ported for the host's locale, the man command searches for the documentation for an alternate locale. If the search is successful, the documentation page is displayed after conversion to the local host's locale. If the alternate locale is not installed on the local host, the man command fails to display the docu- mentation page. Formats the manual information using the troff command. This flag -t is ignored if the manual page is found in a hypertext information base. Exit Status This command returns the following exit values: 0 Successful completion. >0 An error occurred. Examples 1. To display information about the grep command, enter: man grep 2. To display information about the rpc_$register library routine, enter: man rpc_egister 3. To display all entries in the /usr/share/man/whatis key- word database that contain the "mkdir" string , enter: man -k mkdir The output is equivalent to the apropos command. You re- ceive output from the -k flag only when the /usr/share/man/whatis key- word database already exists. 4. To display all entries from the keyword database related to the nroff and troff commands, enter: man -f nroff troff The output is equivalent to the whatis command. You re- ceive output from the -f flag only when the /usr/share/man/whatis key- word database already exists. 5. To display all ftp command related articles in the /usr/share/man or /usr/share/man/local path, enter: man -M/usr/share/man:/usr/share/man/local ftp 6. To display all matching entries, type the following: man -a Title 7. To display only the first matching entry, type the follow- ing: man -F Title 8. To search only in the paths specified in MANPATH or -M, type the following: man -m -M PATH Title 9. To search in the user-defined PATH, type the following: man -M PATH Title 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.
Man Page