1MAN(1P)                    POSIX Programmer's Manual                   MAN(1P)
2
3
4

PROLOG

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

NAME

12       man - display system documentation
13

SYNOPSIS

15       man [-k] name...
16

DESCRIPTION

18       The man utility shall write information about each of  the  name  oper‐
19       ands. If name is the name of a standard utility, man at a minimum shall
20       write a message describing the syntax used by the standard utility, its
21       options,  and operands. If more information is available, the man util‐
22       ity shall provide it in an implementation-defined manner.
23
24       An implementation may provide information for values of name other than
25       the  standard utilities. Standard utilities that are listed as optional
26       and that are not supported by the implementation either shall  cause  a
27       brief  message  indicating  that  fact to be displayed or shall cause a
28       full display of information as described previously.
29

OPTIONS

31       The man utility  shall  conform  to  the  Base  Definitions  volume  of
32       IEEE Std 1003.1-2001, Section 12.2, Utility Syntax Guidelines.
33
34       The following option shall be supported:
35
36       -k     Interpret  name  operands  as keywords to be used in searching a
37              utilities summary database that contains a brief  purpose  entry
38              for each standard utility and write lines from the summary data‐
39              base that match any of the keywords. The  keyword  search  shall
40              produce  results  that  are  the equivalent of the output of the
41              following command:
42
43
44              grep -Ei 'name name...'  summary-database
45
46       This assumes that the summary-database is a text  file  with  a  single
47       entry per line; this organization is not required and the example using
48       grep -Ei is merely illustrative of the type  of  search  intended.  The
49       purpose  entry  to be included in the database shall consist of a terse
50       description of the purpose of the utility.
51
52

OPERANDS

54       The following operand shall be supported:
55
56       name   A keyword or the name of a standard  utility.  When  -k  is  not
57              specified and name does not represent one of the standard utili‐
58              ties, the results are unspecified.
59
60

STDIN

62       Not used.
63

INPUT FILES

65       None.
66

ENVIRONMENT VARIABLES

68       The following environment variables shall affect the execution of man:
69
70       LANG   Provide a default value for the  internationalization  variables
71              that  are  unset  or  null.  (See the Base Definitions volume of
72              IEEE Std 1003.1-2001, Section  8.2,  Internationalization  Vari‐
73              ables  for the precedence of internationalization variables used
74              to determine the values of locale categories.)
75
76       LC_ALL If set to a non-empty string value, override the values  of  all
77              the other internationalization variables.
78
79       LC_CTYPE
80              Determine  the  locale  for  the  interpretation of sequences of
81              bytes of text data as characters (for  example,  single-byte  as
82              opposed to multi-byte characters in arguments and in the summary
83              database).  The value of LC_CTYPE need not affect the format  of
84              the information written about the name operands.
85
86       LC_MESSAGES
87              Determine  the  locale  that should be used to affect the format
88              and contents of diagnostic messages written  to  standard  error
89              and informative messages written to standard output.
90
91       NLSPATH
92              Determine the location of message catalogs for the processing of
93              LC_MESSAGES .
94
95       PAGER  Determine an output filtering command for writing the output  to
96              a terminal. Any string acceptable as a command_string operand to
97              the sh -c command shall be valid. When standard output is a ter‐
98              minal  device,  the reference page output shall be piped through
99              the command.  If the PAGER variable is null or not set, the com‐
100              mand  shall  be  either  more or another paginator utility docu‐
101              mented in the system documentation.
102
103

ASYNCHRONOUS EVENTS

105       Default.
106

STDOUT

108       The man utility shall write text describing the syntax of  the  utility
109       name,  its  options  and  its operands, or, when -k is specified, lines
110       from the summary database. The format of this text  is  implementation-
111       defined.
112

STDERR

114       The standard error shall be used only for diagnostic messages.
115

OUTPUT FILES

117       None.
118

EXTENDED DESCRIPTION

120       None.
121

EXIT STATUS

123       The following exit values shall be returned:
124
125        0     Successful completion.
126
127       >0     An error occurred.
128
129

CONSEQUENCES OF ERRORS

131       Default.
132
133       The following sections are informative.
134

APPLICATION USAGE

136       None.
137

EXAMPLES

139       None.
140

RATIONALE

142       It  is recognized that the man utility is only of minimal usefulness as
143       specified. The opinion of the standard developers was strongly  divided
144       as to how much or how little information man should be required to pro‐
145       vide. They considered, however, that the provision of some portable way
146       of  accessing  documentation  would aid user portability. The arguments
147       against a fuller specification were:
148
149        * Large quantities of documentation should not be required on a system
150          that does not have excess disk space.
151
152        * The  current  manual system does not present information in a manner
153          that greatly aids user portability.
154
155        * A "better help system" is currently an area in  which  vendors  feel
156          that they can add value to their POSIX implementations.
157
158       The -f option was considered, but due to implementation differences, it
159       was not included in this volume of IEEE Std 1003.1-2001.
160
161       The description was changed to be more specific about what  has  to  be
162       displayed for a utility. The standard developers considered it insuffi‐
163       cient to allow a display of only the synopsis without  giving  a  short
164       description of what each option and operand does.
165
166       The  "purpose"  entry  to be included in the database can be similar to
167       the section title  (less  the  numeric  prefix)  from  this  volume  of
168       IEEE Std 1003.1-2001  for  each  utility.  These  titles are similar to
169       those used in historical systems for this purpose.
170
171       See mailx for rationale concerning the default paginator.
172
173       The caveat in the LC_CTYPE description was added because it  is  not  a
174       requirement  that  an implementation provide reference pages for all of
175       its supported locales on each system; changing LC_CTYPE does not neces‐
176       sarily  translate  the  reference  page  into another language. This is
177       equivalent    to    the    current    state    of    LC_MESSAGES     in
178       IEEE Std 1003.1-2001-locale-specific  messages  are  not yet a require‐
179       ment.
180
181       The historical MANPATH variable is not included  in  POSIX  because  no
182       attempt is made to specify naming conventions for reference page files,
183       nor even to mandate that they are files at all.   On  some  implementa‐
184       tions  they  could  be a true database, a hypertext file, or even fixed
185       strings within the man executable.  The standard developers  considered
186       the  portability  of reference pages to be outside their scope of work.
187       However, users should be aware that MANPATH is implemented on a  number
188       of historical systems and that it can be used to tailor the search pat‐
189       tern for reference pages from the various categories (utilities,  func‐
190       tions,  file  formats, and so on) when the system administrator reveals
191       the location and conventions for reference pages on the system.
192
193       The keyword search can rely on at least the text of the section  titles
194       from  these  utility  descriptions, and the implementation may add more
195       keywords. The term "section titles" refers to the strings such as:
196
197
198              man - Display system documentation
199              ps - Report process status
200

FUTURE DIRECTIONS

202       None.
203

SEE ALSO

205       more
206
208       Portions of this text are reprinted and reproduced in  electronic  form
209       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
210       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
211       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
212       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
213       event of any discrepancy between this version and the original IEEE and
214       The Open Group Standard, the original IEEE and The Open Group  Standard
215       is  the  referee document. The original Standard can be obtained online
216       at http://www.opengroup.org/unix/online.html .
217
218
219
220IEEE/The Open Group                  2003                              MAN(1P)
Impressum