Un outil pour savoir si une commande est posix - retour accueil
git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |
man.html (15111B)
1 <!-- Copyright 2001-2024 IEEE and The Open Group, All Rights Reserved --> 2 <!DOCTYPE HTML> 3 <html lang="en"> 4 <head> 5 <meta name="generator" content="HTML Tidy for HTML5 for Linux version 5.8.0"> 6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 7 <link type="text/css" rel="stylesheet" href="style.css"><!-- Generated by The Open Group rhtm tool v1.2.4 --> 8 <!-- Copyright (c) 2001-2024 The Open Group, All Rights Reserved --> 9 <title>man</title> 10 </head> 11 <body bgcolor="white"> 12 <div class="NAVHEADER"> 13 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"> 14 <tr class="nav"> 15 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/make.html" accesskey="P"><<< 16 Previous</a></td> 17 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td> 18 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/mesg.html" accesskey="N">Next >>></a></td> 19 </tr> 20 </table> 21 <hr align="left" width="100%"></div> 22 <script language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> 23 <center><font size="2">The Open Group Base Specifications Issue 8<br> 24 IEEE Std 1003.1-2024<br> 25 Copyright © 2001-2024 The IEEE and The Open Group</font></center> 26 <hr size="2" noshade> 27 <a name="top" id="top"></a> <a name="man" id="man"></a> <a name="tag_20_77" id="tag_20_77"></a><!-- man --> 28 <h4 class="mansect"><a name="tag_20_77_01" id="tag_20_77_01"></a>NAME</h4> 29 <blockquote>man — display system documentation</blockquote> 30 <h4 class="mansect"><a name="tag_20_77_02" id="tag_20_77_02"></a>SYNOPSIS</h4> 31 <blockquote class="synopsis"> 32 <div class="box"><code><tt><sup>[<a href="javascript:open_code('UP')">UP</a>]</sup> <img src="../images/opt-start.gif" alt= 33 "[Option Start]" border="0"> man</tt> <b>[</b><tt>-k</tt><b>]</b> <i>name</i><tt>... <img src="../images/opt-end.gif" alt= 34 "[Option End]" border="0"></tt></code></div> 35 </blockquote> 36 <h4 class="mansect"><a name="tag_20_77_03" id="tag_20_77_03"></a>DESCRIPTION</h4> 37 <blockquote> 38 <p>The <i>man</i> utility shall write information about each of the <i>name</i> operands. If <i>name</i> is the name of a standard 39 utility, <i>man</i> at a minimum shall write a message describing the syntax used by the standard utility, its options, operands, 40 environment variables affecting its execution, and its list of exit status codes. If more information is available, the <i>man</i> 41 utility shall provide it in an implementation-defined manner.</p> 42 <p>An implementation may provide information for values of <i>name</i> other than the standard utilities. Standard utilities that 43 are listed as optional and that are not supported by the implementation either shall cause a brief message indicating that fact to 44 be displayed or shall cause a full display of information as described previously.</p> 45 </blockquote> 46 <h4 class="mansect"><a name="tag_20_77_04" id="tag_20_77_04"></a>OPTIONS</h4> 47 <blockquote> 48 <p>The <i>man</i> utility shall conform to XBD <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax 49 Guidelines</i></a> .</p> 50 <p>The following option shall be supported:</p> 51 <dl compact> 52 <dd></dd> 53 <dt><b>-k</b></dt> 54 <dd>Interpret <i>name</i> operands as keywords to be used in searching a utilities summary database that contains a brief purpose 55 entry for each standard utility and write lines from the summary database that match any of the keywords. The keyword search shall 56 produce results that are the equivalent of the output of the following command: 57 <pre> 58 <tt>grep -Ei ' 59 </tt><i>name 60 name</i><tt> 61 ... 62 ' </tt><i>summary-database</i><tt> 63 </tt></pre> 64 <p>This assumes that the <i>summary-database</i> is a text file with a single entry per line; this organization is not required and 65 the example using <a href="../utilities/grep.html"><i>grep</i></a> <b>-Ei</b> is merely illustrative of the type of search 66 intended. The purpose entry to be included in the database shall consist of a terse description of the purpose of the utility.</p> 67 </dd> 68 </dl> 69 </blockquote> 70 <h4 class="mansect"><a name="tag_20_77_05" id="tag_20_77_05"></a>OPERANDS</h4> 71 <blockquote> 72 <p>The following operand shall be supported:</p> 73 <dl compact> 74 <dd></dd> 75 <dt><i>name</i></dt> 76 <dd>A keyword or the name of a standard utility. When <b>-k</b> is not specified and <i>name</i> does not represent one of the 77 standard utilities, the results are unspecified.</dd> 78 </dl> 79 </blockquote> 80 <h4 class="mansect"><a name="tag_20_77_06" id="tag_20_77_06"></a>STDIN</h4> 81 <blockquote> 82 <p>Not used.</p> 83 </blockquote> 84 <h4 class="mansect"><a name="tag_20_77_07" id="tag_20_77_07"></a>INPUT FILES</h4> 85 <blockquote> 86 <p>None.</p> 87 </blockquote> 88 <h4 class="mansect"><a name="tag_20_77_08" id="tag_20_77_08"></a>ENVIRONMENT VARIABLES</h4> 89 <blockquote> 90 <p>The following environment variables shall affect the execution of <i>man</i>:</p> 91 <dl compact> 92 <dd></dd> 93 <dt><i>LANG</i></dt> 94 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href= 95 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization 96 variables used to determine the values of locale categories.)</dd> 97 <dt><i>LC_ALL</i></dt> 98 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd> 99 <dt><i>LC_CTYPE</i></dt> 100 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as 101 opposed to multi-byte characters in arguments and in the summary database). The value of <i>LC_CTYPE</i> need not affect the format 102 of the information written about the <i>name</i> operands.</dd> 103 <dt><i>LC_MESSAGES</i></dt> 104 <dd><br> 105 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error and 106 informative messages written to standard output.</dd> 107 <dt><i>NLSPATH</i></dt> 108 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 109 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border= 110 "0"></dd> 111 <dt><i>PAGER</i></dt> 112 <dd>Determine an output filtering command for writing the output to a terminal. Any string acceptable as a <i>command_string</i> 113 operand to the <a href="../utilities/sh.html"><i>sh</i></a> <b>-c</b> command shall be valid. When standard output is a terminal 114 device, the reference page output shall be piped through the command. If the <i>PAGER</i> variable is null or not set, the command 115 shall be either <a href="../utilities/more.html"><i>more</i></a> or another paginator utility documented in the system 116 documentation.</dd> 117 </dl> 118 </blockquote> 119 <h4 class="mansect"><a name="tag_20_77_09" id="tag_20_77_09"></a>ASYNCHRONOUS EVENTS</h4> 120 <blockquote> 121 <p>Default.</p> 122 </blockquote> 123 <h4 class="mansect"><a name="tag_20_77_10" id="tag_20_77_10"></a>STDOUT</h4> 124 <blockquote> 125 <p>The <i>man</i> utility shall write text describing the syntax of the utility <i>name</i>, its options and its operands, or, when 126 <b>-k</b> is specified, lines from the summary database. The format of this text is implementation-defined.</p> 127 </blockquote> 128 <h4 class="mansect"><a name="tag_20_77_11" id="tag_20_77_11"></a>STDERR</h4> 129 <blockquote> 130 <p>The standard error shall be used for diagnostic messages, and may also be used for informational messages of unspecified 131 format.</p> 132 </blockquote> 133 <h4 class="mansect"><a name="tag_20_77_12" id="tag_20_77_12"></a>OUTPUT FILES</h4> 134 <blockquote> 135 <p>None.</p> 136 </blockquote> 137 <h4 class="mansect"><a name="tag_20_77_13" id="tag_20_77_13"></a>EXTENDED DESCRIPTION</h4> 138 <blockquote> 139 <p>None.</p> 140 </blockquote> 141 <h4 class="mansect"><a name="tag_20_77_14" id="tag_20_77_14"></a>EXIT STATUS</h4> 142 <blockquote> 143 <p>The following exit values shall be returned:</p> 144 <dl compact> 145 <dd></dd> 146 <dt> 0</dt> 147 <dd>Successful completion.</dd> 148 <dt>>0</dt> 149 <dd>An error occurred.</dd> 150 </dl> 151 </blockquote> 152 <h4 class="mansect"><a name="tag_20_77_15" id="tag_20_77_15"></a>CONSEQUENCES OF ERRORS</h4> 153 <blockquote> 154 <p>Default.</p> 155 </blockquote> 156 <hr> 157 <div class="box"><em>The following sections are informative.</em></div> 158 <h4 class="mansect"><a name="tag_20_77_16" id="tag_20_77_16"></a>APPLICATION USAGE</h4> 159 <blockquote> 160 <p>None.</p> 161 </blockquote> 162 <h4 class="mansect"><a name="tag_20_77_17" id="tag_20_77_17"></a>EXAMPLES</h4> 163 <blockquote> 164 <p>None.</p> 165 </blockquote> 166 <h4 class="mansect"><a name="tag_20_77_18" id="tag_20_77_18"></a>RATIONALE</h4> 167 <blockquote> 168 <p>It is recognized that the <i>man</i> utility is only of minimal usefulness as specified. The opinion of the standard developers 169 was strongly divided as to how much or how little information <i>man</i> should be required to provide. They considered, however, 170 that the provision of some portable way of accessing documentation would aid user portability. The arguments against a fuller 171 specification were:</p> 172 <ul> 173 <li> 174 <p>Large quantities of documentation should not be required on a system that does not have excess disk space.</p> 175 </li> 176 <li> 177 <p>The current manual system does not present information in a manner that greatly aids user portability.</p> 178 </li> 179 <li> 180 <p>A "better help system" is currently an area in which vendors feel that they can add value to their POSIX implementations.</p> 181 </li> 182 </ul> 183 <p>The <b>-f</b> option was considered, but due to implementation differences, it was not included in this volume of 184 POSIX.1-2024.</p> 185 <p>The description was changed to be more specific about what has to be displayed for a utility. The standard developers considered 186 it insufficient to allow a display of only the synopsis without giving a short description of what each option and operand 187 does.</p> 188 <p>The "purpose" entry to be included in the database can be similar to the section title (less the numeric prefix) from this 189 volume of POSIX.1-2024 for each utility. These titles are similar to those used in historical systems for this purpose.</p> 190 <p>See <a href="../utilities/mailx.html"><i>mailx</i></a> for rationale concerning the default paginator.</p> 191 <p>The caveat in the <i>LC_CTYPE</i> description was added because it is not a requirement that an implementation provide reference 192 pages for all of its supported locales on each system; changing <i>LC_CTYPE</i> does not necessarily translate the reference page 193 into another language. This is equivalent to the current state of <i>LC_MESSAGES</i> in POSIX.1-2024—locale-specific messages are 194 not yet a requirement.</p> 195 <p>The historical <i>MANPATH</i> variable is not included in POSIX because no attempt is made to specify naming conventions for 196 reference page files, nor even to mandate that they are files at all. On some implementations they could be a true database, a 197 hypertext file, or even fixed strings within the <i>man</i> executable. The standard developers considered the portability of 198 reference pages to be outside their scope of work. However, users should be aware that <i>MANPATH</i> is implemented on a number of 199 historical systems and that it can be used to tailor the search pattern for reference pages from the various categories (utilities, 200 functions, file formats, and so on) when the system administrator reveals the location and conventions for reference pages on the 201 system.</p> 202 <p>The keyword search can rely on at least the text of the section titles from these utility descriptions, and the implementation 203 may add more keywords. The term "section titles" refers to the strings such as:</p> 204 <pre> 205 <tt>man — Display system documentation 206 ps — Report process status 207 </tt></pre></blockquote> 208 <h4 class="mansect"><a name="tag_20_77_19" id="tag_20_77_19"></a>FUTURE DIRECTIONS</h4> 209 <blockquote> 210 <p>If this utility is directed to display a pathname that contains any bytes that have the encoded value of a <newline> 211 character when <newline> is a terminator or separator in the output format being used, implementations are encouraged to 212 treat this as an error. A future version of this standard may require implementations to treat this as an error.</p> 213 </blockquote> 214 <h4 class="mansect"><a name="tag_20_77_20" id="tag_20_77_20"></a>SEE ALSO</h4> 215 <blockquote> 216 <p><a href="../utilities/more.html#"><i>more</i></a></p> 217 <p>XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a> , <a href= 218 "../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax Guidelines</i></a></p> 219 </blockquote> 220 <h4 class="mansect"><a name="tag_20_77_21" id="tag_20_77_21"></a>CHANGE HISTORY</h4> 221 <blockquote> 222 <p>First released in Issue 4.</p> 223 </blockquote> 224 <h4 class="mansect"><a name="tag_20_77_22" id="tag_20_77_22"></a>Issue 5</h4> 225 <blockquote> 226 <p>The FUTURE DIRECTIONS section is added.</p> 227 </blockquote> 228 <h4 class="mansect"><a name="tag_20_77_23" id="tag_20_77_23"></a>Issue 7</h4> 229 <blockquote> 230 <p>Austin Group Interpretation 1003.1-2001 #108 is applied, clarifying that informational messages may appear on standard 231 error.</p> 232 </blockquote> 233 <h4 class="mansect"><a name="tag_20_77_24" id="tag_20_77_24"></a>Issue 8</h4> 234 <blockquote> 235 <p>Austin Group Defect 190 is applied, marking the <i>man</i> utility as part of the User Portability Utilities option, and adding 236 a requirement for the message it writes for a standard utility to include the environment variables affecting its execution and its 237 list of exit status codes.</p> 238 <p>Austin Group Defect 251 is applied, encouraging implementations to report an error if a utility is directed to display a 239 pathname that contains any bytes that have the encoded value of a <newline> character when <newline> is a terminator or 240 separator in the output format being used.</p> 241 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p> 242 </blockquote> 243 <div class="box"><em>End of informative text.</em></div> 244 <hr> 245 <p> </p> 246 <a href="#top"><span class="topOfPage">return to top of page</span></a><br> 247 <hr size="2" noshade> 248 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br> 249 POSIX™ is a Trademark of The IEEE.<br> 250 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br> 251 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href= 252 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a> 253 ]</font></center> 254 <hr size="2" noshade> 255 <div class="NAVHEADER"> 256 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"> 257 <tr class="nav"> 258 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/make.html" accesskey="P"><<< 259 Previous</a></td> 260 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td> 261 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/mesg.html" accesskey="N">Next >>></a></td> 262 </tr> 263 </table> 264 <hr align="left" width="100%"></div> 265 </body> 266 </html>