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

NAME

6       man - display system documentation
7

SYNOPSIS

9       man [-k] name...
10

DESCRIPTION

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

OPTIONS

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

OPERANDS

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

STDIN

58       Not used.
59

INPUT FILES

61       None.
62

ENVIRONMENT VARIABLES

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

ASYNCHRONOUS EVENTS

101       Default.
102

STDOUT

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

STDERR

110       The standard error shall be used only for diagnostic messages.
111

OUTPUT FILES

113       None.
114

EXTENDED DESCRIPTION

116       None.
117

EXIT STATUS

119       The following exit values shall be returned:
120
121        0     Successful completion.
122
123       >0     An error occurred.
124
125

CONSEQUENCES OF ERRORS

127       Default.
128
129       The following sections are informative.
130

APPLICATION USAGE

132       None.
133

EXAMPLES

135       None.
136

RATIONALE

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

FUTURE DIRECTIONS

198       None.
199

SEE ALSO

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