MAN(1)                     POSIX Programmer's Manual                    MAN(1)



PPRROOLLOOGG
       This manual page is part of the POSIX Programmer's Manual.  The OS
       implementation of this interface may differ (consult the corresponding
       OS manual page for details of OS behavior), or the interface may not be
       implemented on OS.

NNAAMMEE
       man -- display system documentation

SSYYNNOOPPSSIISS
       man [[-k]] _n_a_m_e...

DDEESSCCRRIIPPTTIIOONN
       The _m_a_n utility shall write information about each of the _n_a_m_e
       operands. If _n_a_m_e is the name of a standard utility, _m_a_n at a minimum
       shall write a message describing the syntax used by the standard
       utility, its options, and operands. If more information is available,
       the _m_a_n utility shall provide it in an implementation-defined manner.

       An implementation may provide information for values of _n_a_m_e other than
       the standard utilities. Standard utilities that are listed as optional
       and that are not supported by the implementation either shall cause a
       brief message indicating that fact to be displayed or shall cause a
       full display of information as described previously.

OOPPTTIIOONNSS
       The _m_a_n utility shall conform to the Base Definitions volume of
       POSIX.1-2017, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s.

       The following option shall be supported:

       --kk      Interpret _n_a_m_e operands as keywords to be used in searching a
               utilities summary database that contains a brief purpose entry
               for each standard utility and write lines from the summary
               database that match any of the keywords. The keyword search
               shall produce results that are the equivalent of the output of
               the following command:


                   grep -Ei '
                   _n_a_m_e
                   _n_a_m_e
                   ...
                   ' _s_u_m_m_a_r_y_-_d_a_t_a_b_a_s_e

               This assumes that the _s_u_m_m_a_r_y_-_d_a_t_a_b_a_s_e is a text file with a
               single entry per line; this organization is not required and
               the example using _g_r_e_p --EEii is merely illustrative of the type
               of search intended. The purpose entry to be included in the
               database shall consist of a terse description of the purpose of
               the utility.

OOPPEERRAANNDDSS
       The following operand shall be supported:

       _n_a_m_e      A keyword or the name of a standard utility. When --kk is not
                 specified and _n_a_m_e does not represent one of the standard
                 utilities, the results are unspecified.

SSTTDDIINN
       Not used.

IINNPPUUTT FFIILLEESS
       None.

EENNVVIIRROONNMMEENNTT VVAARRIIAABBLLEESS
       The following environment variables shall affect the execution of _m_a_n:

       _L_A_N_G      Provide a default value for the internationalization
                 variables that are unset or null. (See the Base Definitions
                 volume of POSIX.1-2017, _S_e_c_t_i_o_n _8_._2, _I_n_t_e_r_n_a_t_i_o_n_a_l_i_z_a_t_i_o_n
                 _V_a_r_i_a_b_l_e_s for the precedence of internationalization
                 variables used to determine the values of locale categories.)

       _L_C___A_L_L    If set to a non-empty string value, override the values of
                 all the other internationalization variables.

       _L_C___C_T_Y_P_E  Determine the locale for the interpretation of sequences of
                 bytes of text data as characters (for example, single-byte as
                 opposed to multi-byte characters in arguments and in the
                 summary database). The value of _L_C___C_T_Y_P_E need not affect the
                 format of the information written about the _n_a_m_e operands.

       _L_C___M_E_S_S_A_G_E_S
                 Determine the locale that should be used to affect the format
                 and contents of diagnostic messages written to standard error
                 and informative messages written to standard output.

       _N_L_S_P_A_T_H   Determine the location of message catalogs for the processing
                 of _L_C___M_E_S_S_A_G_E_S.

       _P_A_G_E_R     Determine an output filtering command for writing the output
                 to a terminal. Any string acceptable as a _c_o_m_m_a_n_d___s_t_r_i_n_g
                 operand to the _s_h --cc command shall be valid. When standard
                 output is a terminal device, the reference page output shall
                 be piped through the command. If the _P_A_G_E_R variable is null
                 or not set, the command shall be either _m_o_r_e or another
                 paginator utility documented in the system documentation.

AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
       Default.

SSTTDDOOUUTT
       The _m_a_n utility shall write text describing the syntax of the utility
       _n_a_m_e, its options and its operands, or, when --kk is specified, lines
       from the summary database. The format of this text is implementation-
       defined.

SSTTDDEERRRR
       The standard error shall be used for diagnostic messages, and may also
       be used for informational messages of unspecified format.

OOUUTTPPUUTT FFIILLEESS
       None.

EEXXTTEENNDDEEDD DDEESSCCRRIIPPTTIIOONN
       None.

EEXXIITT SSTTAATTUUSS
       The following exit values shall be returned:

        0    Successful completion.

       >0    An error occurred.

CCOONNSSEEQQUUEENNCCEESS OOFF EERRRROORRSS
       Default.

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       None.

EEXXAAMMPPLLEESS
       None.

RRAATTIIOONNAALLEE
       It is recognized that the _m_a_n utility is only of minimal usefulness as
       specified. The opinion of the standard developers was strongly divided
       as to how much or how little information _m_a_n should be required to
       provide. They considered, however, that the provision of some portable
       way of accessing documentation would aid user portability. The
       arguments against a fuller specification were:

        *  Large quantities of documentation should not be required on a
           system that does not have excess disk space.

        *  The current manual system does not present information in a manner
           that greatly aids user portability.

        *  A ``better help system'' is currently an area in which vendors feel
           that they can add value to their POSIX implementations.

       The --ff option was considered, but due to implementation differences, it
       was not included in this volume of POSIX.1-2017.

       The description was changed to be more specific about what has to be
       displayed for a utility. The standard developers considered it
       insufficient to allow a display of only the synopsis without giving a
       short description of what each option and operand does.

       The ``purpose'' entry to be included in the database can be similar to
       the section title (less the numeric prefix) from this volume of
       POSIX.1-2017 for each utility.  These titles are similar to those used
       in historical systems for this purpose.

       See _m_a_i_l_x for rationale concerning the default paginator.

       The caveat in the _L_C___C_T_Y_P_E description was added because it is not a
       requirement that an implementation provide reference pages for all of
       its supported locales on each system; changing _L_C___C_T_Y_P_E does not
       necessarily translate the reference page into another language. This is
       equivalent to the current state of _L_C___M_E_S_S_A_G_E_S in POSIX.1-2008--locale-
       specific messages are not yet a requirement.

       The historical _M_A_N_P_A_T_H variable is not included in POSIX because no
       attempt is made to specify naming conventions for reference page files,
       nor even to mandate that they are files at all. On some implementations
       they could be a true database, a hypertext file, or even fixed strings
       within the _m_a_n executable. The standard developers considered the
       portability of reference pages to be outside their scope of work.
       However, users should be aware that _M_A_N_P_A_T_H is implemented on a number
       of historical systems and that it can be used to tailor the search
       pattern for reference pages from the various categories (utilities,
       functions, file formats, and so on) when the system administrator
       reveals the location and conventions for reference pages on the system.

       The keyword search can rely on at least the text of the section titles
       from these utility descriptions, and the implementation may add more
       keywords. The term ``section titles'' refers to the strings such as:


           man -- Display system documentation
           ps -- Report process status

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _m_o_r_e

       The Base Definitions volume of POSIX.1-2017, _C_h_a_p_t_e_r _8, _E_n_v_i_r_o_n_m_e_n_t
       _V_a_r_i_a_b_l_e_s, _S_e_c_t_i_o_n _1_2_._2, _U_t_i_l_i_t_y _S_y_n_t_a_x _G_u_i_d_e_l_i_n_e_s

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1-2017, Standard for Information Technology --
       Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the
       Institute of Electrical and Electronics Engineers, Inc and The Open
       Group.  In the event of any discrepancy between this version and the
       original IEEE and The Open Group Standard, the original IEEE and The
       Open Group Standard is the referee document. The original Standard can
       be obtained online at http://www.opengroup.org/unix/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2017                               MAN(1)
