Un outil pour savoir si une commande est posix - retour accueil
git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |
uname.html (10777B)
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>uname</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/unalias.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/uncompress.html" accesskey="N">Next 19 >>></a></td> 20 </tr> 21 </table> 22 <hr align="left" width="100%"></div> 23 <script language="JavaScript" src="../jscript/codes.js"></script><basefont size="3"> 24 <center><font size="2">The Open Group Base Specifications Issue 8<br> 25 IEEE Std 1003.1-2024<br> 26 Copyright © 2001-2024 The IEEE and The Open Group</font></center> 27 <hr size="2" noshade> 28 <a name="top" id="top"></a> <a name="uname" id="uname"></a> <a name="tag_20_134" id="tag_20_134"></a><!-- uname --> 29 <h4 class="mansect"><a name="tag_20_134_01" id="tag_20_134_01"></a>NAME</h4> 30 <blockquote>uname — return system name</blockquote> 31 <h4 class="mansect"><a name="tag_20_134_02" id="tag_20_134_02"></a>SYNOPSIS</h4> 32 <blockquote class="synopsis"> 33 <p><code><tt>uname</tt> <b>[</b><tt>-amnrsv</tt><b>]</b></code></p> 34 </blockquote> 35 <h4 class="mansect"><a name="tag_20_134_03" id="tag_20_134_03"></a>DESCRIPTION</h4> 36 <blockquote> 37 <p>By default, the <i>uname</i> utility shall write the operating system name to standard output. When options are specified, 38 symbols representing one or more system characteristics shall be written to the standard output. The format and contents of the 39 symbols are implementation-defined. On systems conforming to the System Interfaces volume of POSIX.1-2024, the symbols written 40 shall be those supported by the <a href="../functions/uname.html"><i>uname</i>()</a> function as defined in the System Interfaces 41 volume of POSIX.1-2024.</p> 42 </blockquote> 43 <h4 class="mansect"><a name="tag_20_134_04" id="tag_20_134_04"></a>OPTIONS</h4> 44 <blockquote> 45 <p>The <i>uname</i> utility shall conform to XBD <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax 46 Guidelines</i></a> .</p> 47 <p>The following options shall be supported:</p> 48 <dl compact> 49 <dd></dd> 50 <dt><b>-a</b></dt> 51 <dd>Behave as though all of the options <b>-mnrsv</b> were specified.</dd> 52 <dt><b>-m</b></dt> 53 <dd>Write the name of the hardware type on which the system is running to standard output.</dd> 54 <dt><b>-n</b></dt> 55 <dd>Write the name of this node within an implementation-defined communications network.</dd> 56 <dt><b>-r</b></dt> 57 <dd>Write the current release level of the operating system implementation.</dd> 58 <dt><b>-s</b></dt> 59 <dd>Write the name of the implementation of the operating system.</dd> 60 <dt><b>-v</b></dt> 61 <dd>Write the current version level of this release of the operating system implementation.</dd> 62 </dl> 63 <p>If no options are specified, the <i>uname</i> utility shall write the operating system name, as if the <b>-s</b> option had been 64 specified.</p> 65 </blockquote> 66 <h4 class="mansect"><a name="tag_20_134_05" id="tag_20_134_05"></a>OPERANDS</h4> 67 <blockquote> 68 <p>None.</p> 69 </blockquote> 70 <h4 class="mansect"><a name="tag_20_134_06" id="tag_20_134_06"></a>STDIN</h4> 71 <blockquote> 72 <p>Not used.</p> 73 </blockquote> 74 <h4 class="mansect"><a name="tag_20_134_07" id="tag_20_134_07"></a>INPUT FILES</h4> 75 <blockquote> 76 <p>None.</p> 77 </blockquote> 78 <h4 class="mansect"><a name="tag_20_134_08" id="tag_20_134_08"></a>ENVIRONMENT VARIABLES</h4> 79 <blockquote> 80 <p>The following environment variables shall affect the execution of <i>uname</i>:</p> 81 <dl compact> 82 <dd></dd> 83 <dt><i>LANG</i></dt> 84 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href= 85 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization 86 variables used to determine the values of locale categories.)</dd> 87 <dt><i>LC_ALL</i></dt> 88 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd> 89 <dt><i>LC_CTYPE</i></dt> 90 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as 91 opposed to multi-byte characters in arguments).</dd> 92 <dt><i>LC_MESSAGES</i></dt> 93 <dd><br> 94 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.</dd> 95 <dt><i>NLSPATH</i></dt> 96 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> 97 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border= 98 "0"></dd> 99 </dl> 100 </blockquote> 101 <h4 class="mansect"><a name="tag_20_134_09" id="tag_20_134_09"></a>ASYNCHRONOUS EVENTS</h4> 102 <blockquote> 103 <p>Default.</p> 104 </blockquote> 105 <h4 class="mansect"><a name="tag_20_134_10" id="tag_20_134_10"></a>STDOUT</h4> 106 <blockquote> 107 <p>By default, the output shall be a single line of the following form:</p> 108 <pre> 109 <tt>"%s\n", <</tt><i>sysname</i><tt>> 110 </tt></pre> 111 <p>If the <b>-a</b> option is specified, the output shall be a single line of the following form:</p> 112 <pre> 113 <tt>"%s %s %s %s %s\n", <</tt><i>sysname</i><tt>>, <</tt><i>nodename</i><tt>>, <</tt><i>release</i><tt>>, 114 <</tt><i>version</i><tt>>, <</tt><i>machine</i><tt>> 115 </tt></pre> 116 <p>Additional implementation-defined symbols may be written; all such symbols shall be written at the end of the line of output 117 before the <newline>.</p> 118 <p>If options are specified to select different combinations of the symbols, only those symbols shall be written, in the order 119 shown above for the <b>-a</b> option. If a symbol is not selected for writing, its corresponding trailing <blank> characters 120 also shall not be written.</p> 121 </blockquote> 122 <h4 class="mansect"><a name="tag_20_134_11" id="tag_20_134_11"></a>STDERR</h4> 123 <blockquote> 124 <p>The standard error shall be used only for diagnostic messages.</p> 125 </blockquote> 126 <h4 class="mansect"><a name="tag_20_134_12" id="tag_20_134_12"></a>OUTPUT FILES</h4> 127 <blockquote> 128 <p>None.</p> 129 </blockquote> 130 <h4 class="mansect"><a name="tag_20_134_13" id="tag_20_134_13"></a>EXTENDED DESCRIPTION</h4> 131 <blockquote> 132 <p>None.</p> 133 </blockquote> 134 <h4 class="mansect"><a name="tag_20_134_14" id="tag_20_134_14"></a>EXIT STATUS</h4> 135 <blockquote> 136 <p>The following exit values shall be returned:</p> 137 <dl compact> 138 <dd></dd> 139 <dt> 0</dt> 140 <dd>The requested information was successfully written.</dd> 141 <dt>>0</dt> 142 <dd>An error occurred.</dd> 143 </dl> 144 </blockquote> 145 <h4 class="mansect"><a name="tag_20_134_15" id="tag_20_134_15"></a>CONSEQUENCES OF ERRORS</h4> 146 <blockquote> 147 <p>Default.</p> 148 </blockquote> 149 <hr> 150 <div class="box"><em>The following sections are informative.</em></div> 151 <h4 class="mansect"><a name="tag_20_134_16" id="tag_20_134_16"></a>APPLICATION USAGE</h4> 152 <blockquote> 153 <p>Note that any of the symbols could include embedded <space> characters, which may affect parsing algorithms if multiple 154 options are selected for output.</p> 155 <p>The node name is typically a name that the system uses to identify itself for inter-system communication addressing.</p> 156 </blockquote> 157 <h4 class="mansect"><a name="tag_20_134_17" id="tag_20_134_17"></a>EXAMPLES</h4> 158 <blockquote> 159 <p>The following command:</p> 160 <pre> 161 <tt>uname -sr 162 </tt></pre> 163 <p>writes the operating system name and release level, separated by one or more <blank> characters.</p> 164 </blockquote> 165 <h4 class="mansect"><a name="tag_20_134_18" id="tag_20_134_18"></a>RATIONALE</h4> 166 <blockquote> 167 <p>It was suggested that this utility cannot be used portably since the format of the symbols is implementation-defined. The 168 POSIX.1 working group could not achieve consensus on defining these formats in the underlying <a href= 169 "../functions/uname.html"><i>uname</i>()</a> function, and there was no expectation that this volume of POSIX.1-2024 would be any 170 more successful. Some applications may still find this historical utility of value. For example, the symbols could be used for 171 system log entries or for comparison with operator or user input.</p> 172 </blockquote> 173 <h4 class="mansect"><a name="tag_20_134_19" id="tag_20_134_19"></a>FUTURE DIRECTIONS</h4> 174 <blockquote> 175 <p>None.</p> 176 </blockquote> 177 <h4 class="mansect"><a name="tag_20_134_20" id="tag_20_134_20"></a>SEE ALSO</h4> 178 <blockquote> 179 <p>XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a> , <a href= 180 "../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax Guidelines</i></a></p> 181 <p>XSH <a href="../functions/uname.html#tag_17_646"><i>uname</i></a></p> 182 </blockquote> 183 <h4 class="mansect"><a name="tag_20_134_21" id="tag_20_134_21"></a>CHANGE HISTORY</h4> 184 <blockquote> 185 <p>First released in Issue 2.</p> 186 </blockquote> 187 <h4 class="mansect"><a name="tag_20_134_22" id="tag_20_134_22"></a>Issue 8</h4> 188 <blockquote> 189 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p> 190 </blockquote> 191 <div class="box"><em>End of informative text.</em></div> 192 <hr> 193 <p> </p> 194 <a href="#top"><span class="topOfPage">return to top of page</span></a><br> 195 <hr size="2" noshade> 196 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br> 197 POSIX™ is a Trademark of The IEEE.<br> 198 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br> 199 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href= 200 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a> 201 ]</font></center> 202 <hr size="2" noshade> 203 <div class="NAVHEADER"> 204 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0"> 205 <tr class="nav"> 206 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/unalias.html" accesskey="P"><<< 207 Previous</a></td> 208 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td> 209 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/uncompress.html" accesskey="N">Next 210 >>></a></td> 211 </tr> 212 </table> 213 <hr align="left" width="100%"></div> 214 </body> 215 </html>