1MAN(1P) POSIX Programmer's Manual MAN(1P)
2
3
4
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
12 man - display system documentation
13
15 man [-k] name...
16
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
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 '
45 name
46 name...
47
48 This assumes that the summary-database is a text file with a single
49 entry per line; this organization is not required and the example using
50 grep -Ei is merely illustrative of the type of search intended. The
51 purpose entry to be included in the database shall consist of a terse
52 description of the purpose of the utility.
53
54
56 The following operand shall be supported:
57
58 name A keyword or the name of a standard utility. When -k is not
59 specified and name does not represent one of the standard utili‐
60 ties, the results are unspecified.
61
62
64 Not used.
65
67 None.
68
70 The following environment variables shall affect the execution of man:
71
72 LANG Provide a default value for the internationalization variables
73 that are unset or null. (See the Base Definitions volume of
74 IEEE Std 1003.1-2001, Section 8.2, Internationalization Vari‐
75 ables for the precedence of internationalization variables used
76 to determine the values of locale categories.)
77
78 LC_ALL If set to a non-empty string value, override the values of all
79 the other internationalization variables.
80
81 LC_CTYPE
82 Determine the locale for the interpretation of sequences of
83 bytes of text data as characters (for example, single-byte as
84 opposed to multi-byte characters in arguments and in the summary
85 database). The value of LC_CTYPE need not affect the format of
86 the information written about the name operands.
87
88 LC_MESSAGES
89 Determine the locale that should be used to affect the format
90 and contents of diagnostic messages written to standard error
91 and informative messages written to standard output.
92
93 NLSPATH
94 Determine the location of message catalogs for the processing of
95 LC_MESSAGES .
96
97 PAGER Determine an output filtering command for writing the output to
98 a terminal. Any string acceptable as a command_string operand to
99 the sh -c command shall be valid. When standard output is a ter‐
100 minal device, the reference page output shall be piped through
101 the command. If the PAGER variable is null or not set, the com‐
102 mand shall be either more or another paginator utility docu‐
103 mented in the system documentation.
104
105
107 Default.
108
110 The man utility shall write text describing the syntax of the utility
111 name, its options and its operands, or, when -k is specified, lines
112 from the summary database. The format of this text is implementation-
113 defined.
114
116 The standard error shall be used only for diagnostic messages.
117
119 None.
120
122 None.
123
125 The following exit values shall be returned:
126
127 0 Successful completion.
128
129 >0 An error occurred.
130
131
133 Default.
134
135 The following sections are informative.
136
138 None.
139
141 None.
142
144 It is recognized that the man utility is only of minimal usefulness as
145 specified. The opinion of the standard developers was strongly divided
146 as to how much or how little information man should be required to pro‐
147 vide. They considered, however, that the provision of some portable way
148 of accessing documentation would aid user portability. The arguments
149 against a fuller specification were:
150
151 * Large quantities of documentation should not be required on a system
152 that does not have excess disk space.
153
154 * The current manual system does not present information in a manner
155 that greatly aids user portability.
156
157 * A "better help system" is currently an area in which vendors feel
158 that they can add value to their POSIX implementations.
159
160 The -f option was considered, but due to implementation differences, it
161 was not included in this volume of IEEE Std 1003.1-2001.
162
163 The description was changed to be more specific about what has to be
164 displayed for a utility. The standard developers considered it insuffi‐
165 cient to allow a display of only the synopsis without giving a short
166 description of what each option and operand does.
167
168 The "purpose" entry to be included in the database can be similar to
169 the section title (less the numeric prefix) from this volume of
170 IEEE Std 1003.1-2001 for each utility. These titles are similar to
171 those used in historical systems for this purpose.
172
173 See mailx for rationale concerning the default paginator.
174
175 The caveat in the LC_CTYPE description was added because it is not a
176 requirement that an implementation provide reference pages for all of
177 its supported locales on each system; changing LC_CTYPE does not neces‐
178 sarily translate the reference page into another language. This is
179 equivalent to the current state of LC_MESSAGES in
180 IEEE Std 1003.1-2001-locale-specific messages are not yet a require‐
181 ment.
182
183 The historical MANPATH variable is not included in POSIX because no
184 attempt is made to specify naming conventions for reference page files,
185 nor even to mandate that they are files at all. On some implementa‐
186 tions they could be a true database, a hypertext file, or even fixed
187 strings within the man executable. The standard developers considered
188 the portability of reference pages to be outside their scope of work.
189 However, users should be aware that MANPATH is implemented on a number
190 of historical systems and that it can be used to tailor the search pat‐
191 tern for reference pages from the various categories (utilities, func‐
192 tions, file formats, and so on) when the system administrator reveals
193 the location and conventions for reference pages on the system.
194
195 The keyword search can rely on at least the text of the section titles
196 from these utility descriptions, and the implementation may add more
197 keywords. The term "section titles" refers to the strings such as:
198
199
200 man - Display system documentation
201 ps - Report process status
202
204 None.
205
207 more
208
210 Portions of this text are reprinted and reproduced in electronic form
211 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
212 -- Portable Operating System Interface (POSIX), The Open Group Base
213 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
214 Electrical and Electronics Engineers, Inc and The Open Group. In the
215 event of any discrepancy between this version and the original IEEE and
216 The Open Group Standard, the original IEEE and The Open Group Standard
217 is the referee document. The original Standard can be obtained online
218 at http://www.opengroup.org/unix/online.html .
219
220
221
222IEEE/The Open Group 2003 MAN(1P)