isposix

Un outil pour savoir si une commande est posix - retour accueil

git clone git://bebou.netlib.re/isposix
Log | Files | Refs | README |

ls.html (48679B)


      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>ls</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/lp.html" accesskey="P">&lt;&lt;&lt;
     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/m4.html" accesskey="N">Next &gt;&gt;&gt;</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="ls" id="ls"></a> <a name="tag_20_73" id="tag_20_73"></a><!-- ls -->
     28 <h4 class="mansect"><a name="tag_20_73_01" id="tag_20_73_01"></a>NAME</h4>
     29 <blockquote>ls — list directory contents</blockquote>
     30 <h4 class="mansect"><a name="tag_20_73_02" id="tag_20_73_02"></a>SYNOPSIS</h4>
     31 <blockquote class="synopsis">
     32 <p><code><tt><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> ls</tt> <b>[</b><tt>-ikqrs</tt><b>] [</b><tt>-<img src=
     33 "../images/opt-start.gif" border="0">g<img src="../images/opt-end.gif" border="0">ln<img src="../images/opt-start.gif" border=
     34 "0">o<img src="../images/opt-end.gif" border="0"></tt><b>] [</b><tt>-A|-a</tt><b>] [</b><tt>-C|-m|-x|-1</tt><b>]</b> <tt>\<br>
     35 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> <b>[</b><tt>-F|-p</tt><b>] [</b><tt>-H|-L</tt><b>] [</b><tt>-R|-d</tt><b>]
     36 [</b><tt>-S|-f|-t</tt><b>] [</b><tt>-c|-u</tt><b>] [</b><i>file</i><tt>...</tt><b>]</b></code></p>
     37 </blockquote>
     38 <h4 class="mansect"><a name="tag_20_73_03" id="tag_20_73_03"></a>DESCRIPTION</h4>
     39 <blockquote>
     40 <p>For each operand that names a file of a type other than directory or symbolic link to a directory, <i>ls</i> shall write the
     41 name of the file as well as any requested, associated information. For each operand that names a file of type directory, <i>ls</i>
     42 shall write the names of files contained within the directory as well as any requested, associated information. Filenames beginning
     43 with a &lt;period&gt; (<tt>'.'</tt>) and any associated information shall not be written out unless explicitly referenced, the
     44 <b>-A</b> or <b>-a</b> option is supplied, or an implementation-defined condition causes them to be written. If one or more of the
     45 <b>-d</b>, <b>-F</b>, or <b>-l</b> options are specified, and neither the <b>-H</b> nor the <b>-L</b> option is specified, for each
     46 operand that names a file of type symbolic link to a directory, <i>ls</i> shall write the name of the file as well as any
     47 requested, associated information. If none of the <b>-d</b>, <b>-F</b>, or <b>-l</b> options are specified, or the <b>-H</b> or
     48 <b>-L</b> options are specified, for each operand that names a file of type symbolic link to a directory, <i>ls</i> shall write the
     49 names of files contained within the directory as well as any requested, associated information. In each case where the names of
     50 files contained within a directory are written, if the directory contains any symbolic links then <i>ls</i> shall evaluate the file
     51 information and file type to be those of the symbolic link itself, unless the <b>-L</b> option is specified.</p>
     52 <p>If no operands are specified, <i>ls</i> shall behave as if a single operand of dot (<tt>'.'</tt>) had been specified. If more
     53 than one operand is specified, <i>ls</i> shall write non-directory operands first; it shall sort directory and non-directory
     54 operands separately according to the collating sequence in the current locale.</p>
     55 <p>Whenever <i>ls</i> sorts filenames or pathnames according to the collating sequence in the current locale, if this collating
     56 sequence does not have a total ordering of all characters (see XBD <a href="../basedefs/V1_chap07.html#tag_07_03_02"><i>7.3.2
     57 LC_COLLATE</i></a> ), then any filenames or pathnames that collate equally shall be further compared byte-by-byte using the
     58 collating sequence for the POSIX locale.</p>
     59 <p>The <i>ls</i> utility shall detect infinite loops; that is, entering a previously visited directory that is an ancestor of the
     60 last file encountered. When it detects an infinite loop, <i>ls</i> shall write a diagnostic message to standard error and shall
     61 either recover its position in the hierarchy or terminate.</p>
     62 </blockquote>
     63 <h4 class="mansect"><a name="tag_20_73_04" id="tag_20_73_04"></a>OPTIONS</h4>
     64 <blockquote>
     65 <p>The <i>ls</i> utility shall conform to XBD <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax
     66 Guidelines</i></a> .</p>
     67 <p>The following options shall be supported:</p>
     68 <dl compact>
     69 <dd></dd>
     70 <dt><b>-A</b></dt>
     71 <dd>Write out all directory entries, including those whose names begin with a &lt;period&gt; (<tt>'.'</tt>) but excluding the
     72 entries dot and dot-dot (if they exist).</dd>
     73 <dt><b>-C</b></dt>
     74 <dd>Write multi-text-column output with entries sorted down the columns, according to the collating sequence. The number of text
     75 columns and the column separator characters are unspecified, but should be adapted to the nature of the output device. This option
     76 disables long format output. <basefont size="2">
     77 <dl>
     78 <dt><b>Note:</b></dt>
     79 <dd>Since the output from this option may use separator characters that include characters that might appear in filenames (in
     80 addition to the problems related to &lt;newline&gt;s in filenames), <b>-C</b> should not be used when filenames might be extracted
     81 from the output by a script.</dd>
     82 </dl>
     83 <basefont size="3"></dd>
     84 <dt><b>-F</b></dt>
     85 <dd>Do not follow symbolic links named as operands unless the <b>-H</b> or <b>-L</b> options are specified. Write a &lt;slash&gt;
     86 (<tt>'/'</tt>) immediately after each pathname that is a directory, an &lt;asterisk&gt; (<tt>'*'</tt>) after each that is
     87 executable, a &lt;vertical-line&gt; (<tt>'|'</tt>) after each that is a FIFO, an &lt;equals-sign&gt; (<tt>'='</tt>) after each that
     88 is a socket, and a &lt;commercial-at&gt; (<tt>'@'</tt>) after each that is a symbolic link. For other file types, other symbols may
     89 be written.</dd>
     90 <dt><b>-H</b></dt>
     91 <dd>Evaluate the file information and file type for symbolic links specified on the command line to be those of the file referenced
     92 by the link, and not the link itself; however, <i>ls</i> shall write the name of the link itself and not the file referenced by the
     93 link.</dd>
     94 <dt><b>-L</b></dt>
     95 <dd>Evaluate the file information and file type for all symbolic links (whether named on the command line or encountered in a file
     96 hierarchy) to be those of the file referenced by the link, and not the link itself; however, <i>ls</i> shall write the name of the
     97 link itself and not the file referenced by the link. When <b>-L</b> is used with <b>-l</b>, write the contents of symbolic links in
     98 the long format (see the STDOUT section).</dd>
     99 <dt><b>-R</b></dt>
    100 <dd>Recursively list subdirectories encountered. Subdirectories with filenames beginning with a &lt;period&gt; (<tt>'.'</tt>) shall
    101 be recursively listed if and only if the subdirectory name was included in the filenames listed for the containing directory. When
    102 a symbolic link to a directory is encountered, the directory shall not be recursively listed unless the <b>-L</b> option is
    103 specified. The use of <b>-R</b> with <b>-d</b> or <b>-f</b> produces unspecified results.</dd>
    104 <dt><b>-S</b></dt>
    105 <dd>Sort with the primary key being file size (in decreasing order) and the secondary key being filename in the collating sequence
    106 (in increasing order). For a symbolic link, the size used as the sort key is that of the symbolic link itself, unless <i>ls</i> is
    107 evaluating its file information to be that of the file referenced by the link (see the <b>-H</b> and <b>-L</b> options).</dd>
    108 <dt><b>-a</b></dt>
    109 <dd>Write out all directory entries, including those whose names begin with a &lt;period&gt; (<tt>'.'</tt>).</dd>
    110 <dt><b>-c</b></dt>
    111 <dd>Use time of last modification of the file status information (see XBD <a href=
    112 "../basedefs/sys_stat.h.html"><i>&lt;sys/stat.h&gt;</i></a> ) instead of last modification of the file itself for sorting
    113 (<b>-t</b>) or writing (<b>-l</b>).</dd>
    114 <dt><b>-d</b></dt>
    115 <dd>Do not follow symbolic links named as operands unless the <b>-H</b> or <b>-L</b> options are specified. Do not treat
    116 directories differently than other types of files. The use of <b>-d</b> with <b>-R</b> or <b>-f</b> produces unspecified
    117 results.</dd>
    118 <dt><b>-f</b></dt>
    119 <dd>List the entries in directory operands in the order they appear in the directory. The behavior for non-directory operands is
    120 unspecified. This option shall turn on <b>-a</b>. When <b>-f</b> is specified, any occurrences of the <b>-r</b>, <b>-S</b>, and
    121 <b>-t</b> options shall be ignored and any occurrences of the <b>-A</b>, <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup>
    122 <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> <b>-g</b>, <img src="../images/opt-end.gif" alt="[Option End]"
    123 border="0"> <b>-l</b>, <b>-n</b>, <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif"
    124 alt="[Option Start]" border="0"> <b>-o</b>, <img src="../images/opt-end.gif" alt="[Option End]" border="0"> and <b>-s</b> options
    125 may be ignored. The use of <b>-f</b> with <b>-R</b> or <b>-d</b> produces unspecified results.</dd>
    126 <dt><b>-g</b></dt>
    127 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    128 Turn on the <b>-l</b> (ell) option, but disable writing the file's owner name or number. Disable the <b>-C</b>, <b>-m</b>, and
    129 <b>-x</b> options. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    130 <dt><b>-i</b></dt>
    131 <dd>For each file, write the file's file serial number (see <a href="../functions/stat.html"><i>stat</i>()</a> in the System
    132 Interfaces volume of POSIX.1-2024).</dd>
    133 <dt><b>-k</b></dt>
    134 <dd>Set the block size for the <b>-s</b> option and the per-directory block count written for the <b>-l</b>, <b>-n</b>, <b>-s</b>,
    135 <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    136 <b>-g</b>, and <b>-o</b> <img src="../images/opt-end.gif" alt="[Option End]" border="0"> options (see the STDOUT section) to 1024
    137 bytes.</dd>
    138 <dt><b>-l</b></dt>
    139 <dd>(The letter ell.) Do not follow symbolic links named as operands unless the <b>-H</b> or <b>-L</b> options are specified. Write
    140 out in long format (see the STDOUT section). Disable the <b>-C</b>, <b>-m</b>, and <b>-x</b> options.</dd>
    141 <dt><b>-m</b></dt>
    142 <dd>Stream output format; list pathnames across the page, separated by a &lt;comma&gt; character followed by a &lt;space&gt;
    143 character. Use a &lt;newline&gt; character as the list terminator and after the separator sequence when there is not room on a line
    144 for the next list entry. This option disables long format output.</dd>
    145 <dt><b>-n</b></dt>
    146 <dd>Turn on the <b>-l</b> (ell) option, but when writing the file's owner or group, write the file's numeric UID or GID rather than
    147 the user or group name, respectively. Disable the <b>-C</b>, <b>-m</b>, and <b>-x</b> options.</dd>
    148 <dt><b>-o</b></dt>
    149 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    150 Turn on the <b>-l</b> (ell) option, but disable writing the file's group name or number. Disable the <b>-C</b>, <b>-m</b>, and
    151 <b>-x</b> options. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    152 <dt><b>-p</b></dt>
    153 <dd>Write a &lt;slash&gt; (<tt>'/'</tt>) after each pathname if that file is a directory.</dd>
    154 <dt><b>-q</b></dt>
    155 <dd>Force each instance of non-printable filename characters (including &lt;newline&gt;, &lt;tab&gt;, and other control characters)
    156 to be written as the &lt;question-mark&gt; (<tt>'?'</tt>) character. Implementations may provide this option by default if the
    157 output is to a terminal device.</dd>
    158 <dt><b>-r</b></dt>
    159 <dd>Reverse the order of the sort to get reverse collating sequence, oldest first, or smallest file size first depending on the
    160 other options given.</dd>
    161 <dt><b>-s</b></dt>
    162 <dd>Indicate the total number of file system blocks consumed by each file displayed. If the <b>-k</b> option is also specified, the
    163 block size shall be 1024 bytes; otherwise, the block size is implementation-defined.</dd>
    164 <dt><b>-t</b></dt>
    165 <dd>Sort with the primary key being time modified (most recently modified first) and the secondary key being filename in the
    166 collating sequence. For a symbolic link, the time used as the sort key is that of the symbolic link itself, unless <i>ls</i> is
    167 evaluating its file information to be that of the file referenced by the link (see the <b>-H</b> and <b>-L</b> options).</dd>
    168 <dt><b>-u</b></dt>
    169 <dd>Use time of last access (see XBD <a href="../basedefs/sys_stat.h.html"><i>&lt;sys/stat.h&gt;</i></a> ) instead of last
    170 modification of the file for sorting (<b>-t</b>) or writing (<b>-l</b>).</dd>
    171 <dt><b>-x</b></dt>
    172 <dd>The same as <b>-C</b>, except that the multi-text-column output is produced with entries sorted across, rather than down, the
    173 columns. This option disables long format output.</dd>
    174 <dt><b>-1</b></dt>
    175 <dd>(The numeric digit one.) Force output to be one entry per line. This option does not disable long format output. (Long format
    176 output is enabled by <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt=
    177 "[Option Start]" border="0"> <b>-g</b>, <img src="../images/opt-end.gif" alt="[Option End]" border="0"> <b>-l</b> (ell), <b>-n</b>,
    178 and <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    179 <b>-o</b>; <img src="../images/opt-end.gif" alt="[Option End]" border="0"> and disabled by <b>-C</b>, <b>-m</b>, and
    180 <b>-x</b>.)</dd>
    181 </dl>
    182 <p>If an option that enables long format output (<sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src=
    183 "../images/opt-start.gif" alt="[Option Start]" border="0"> <b>-g</b>, <img src="../images/opt-end.gif" alt="[Option End]" border=
    184 "0"> <b>-l</b> (ell), <b>-n</b>, and <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif"
    185 alt="[Option Start]" border="0"> <b>-o</b><img src="../images/opt-end.gif" alt="[Option End]" border="0"> ) is given with an option
    186 that disables long format output (<b>-C</b>, <b>-m</b>, and <b>-x</b>), this shall not be considered an error. The last of these
    187 options specified shall determine whether long format output is written.</p>
    188 <p>If <b>-R</b>, <b>-d</b>, or <b>-f</b> are specified, the results of specifying these mutually-exclusive options are specified by
    189 the descriptions of these options above. If more than one of any of the other options shown in the SYNOPSIS section in
    190 mutually-exclusive sets are given, this shall not be considered an error; the last option specified in each set shall determine the
    191 output.</p>
    192 <p>Note that if <b>-t</b> is specified, <b>-c</b> and <b>-u</b> are not only mutually-exclusive with each other, they are also
    193 mutually-exclusive with <b>-S</b> when determining sort order. But even if <b>-S</b> is specified after all occurrences of
    194 <b>-c</b>, <b>-t</b>, and <b>-u</b>, the last use of <b>-c</b> or <b>-u</b> determines the timestamp printed when producing long
    195 format output.</p>
    196 </blockquote>
    197 <h4 class="mansect"><a name="tag_20_73_05" id="tag_20_73_05"></a>OPERANDS</h4>
    198 <blockquote>
    199 <p>The following operand shall be supported:</p>
    200 <dl compact>
    201 <dd></dd>
    202 <dt><i>file</i></dt>
    203 <dd>A pathname of a file to be written. If the file specified is not found, a diagnostic message shall be output on standard
    204 error.</dd>
    205 </dl>
    206 </blockquote>
    207 <h4 class="mansect"><a name="tag_20_73_06" id="tag_20_73_06"></a>STDIN</h4>
    208 <blockquote>
    209 <p>Not used.</p>
    210 </blockquote>
    211 <h4 class="mansect"><a name="tag_20_73_07" id="tag_20_73_07"></a>INPUT FILES</h4>
    212 <blockquote>
    213 <p>None.<br></p>
    214 </blockquote>
    215 <h4 class="mansect"><a name="tag_20_73_08" id="tag_20_73_08"></a>ENVIRONMENT VARIABLES</h4>
    216 <blockquote>
    217 <p>The following environment variables shall affect the execution of <i>ls</i>:</p>
    218 <dl compact>
    219 <dd></dd>
    220 <dt><i>COLUMNS</i></dt>
    221 <dd>Override the system-selected horizontal display line size, used to determine the column position width for writing multiple
    222 text-column output. See XBD <a href="../basedefs/V1_chap08.html#tag_08"><i>8. Environment Variables</i></a> for valid values and
    223 results when it is unset or null. The <i>ls</i> utility shall use this value to calculate how many pathname text columns to write
    224 (see <b>-C</b>). The column width chosen to write the names of files in any given directory shall be constant. Filenames shall not
    225 be truncated to fit into the multiple text-column output.</dd>
    226 <dt><i>LANG</i></dt>
    227 <dd>Provide a default value for the internationalization variables that are unset or null. (See XBD <a href=
    228 "../basedefs/V1_chap08.html#tag_08_02"><i>8.2 Internationalization Variables</i></a> for the precedence of internationalization
    229 variables used to determine the values of locale categories.)</dd>
    230 <dt><i>LC_ALL</i></dt>
    231 <dd>If set to a non-empty string value, override the values of all the other internationalization variables.</dd>
    232 <dt><i>LC_COLLATE</i></dt>
    233 <dd><br>
    234 Determine the locale for character collation information in determining the pathname collation sequence.</dd>
    235 <dt><i>LC_CTYPE</i></dt>
    236 <dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as
    237 opposed to multi-byte characters in arguments) and which characters are defined as printable (character class <b>print</b>).</dd>
    238 <dt><i>LC_MESSAGES</i></dt>
    239 <dd><br>
    240 Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error.</dd>
    241 <dt><i>LC_TIME</i></dt>
    242 <dd>Determine the format and contents for date and time strings written by <i>ls</i>.</dd>
    243 <dt><i>NLSPATH</i></dt>
    244 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    245 Determine the location of messages objects and message catalogs. <img src="../images/opt-end.gif" alt="[Option End]" border=
    246 "0"></dd>
    247 <dt><i>TZ</i></dt>
    248 <dd>Determine the timezone for date and time strings written by <i>ls</i>. If <i>TZ</i> is unset or null, an unspecified default
    249 timezone shall be used.</dd>
    250 </dl>
    251 </blockquote>
    252 <h4 class="mansect"><a name="tag_20_73_09" id="tag_20_73_09"></a>ASYNCHRONOUS EVENTS</h4>
    253 <blockquote>
    254 <p>Default.</p>
    255 </blockquote>
    256 <h4 class="mansect"><a name="tag_20_73_10" id="tag_20_73_10"></a>STDOUT</h4>
    257 <blockquote>
    258 <p>The default format shall be to list one entry per line to standard output; the exceptions are to terminals or when one of the
    259 <b>-C</b>, <b>-m</b>, or <b>-x</b> options is specified. If the output is to a terminal, the format is implementation-defined.</p>
    260 <p>In the formats specified below, except where specified otherwise the &lt;<i>pathname</i>&gt; field shall consist of the file's
    261 pathname and, if the <b>-F</b> or <b>-p</b> option is specified, any indicator character written after the pathname as described
    262 for those options.</p>
    263 <p>When <b>-m</b> is specified, the format used for the last element of the list shall be:</p>
    264 <pre>
    265 <tt>"%s\n", &lt;</tt><i>pathname</i><tt>&gt;
    266 </tt></pre>
    267 <p>The format used for each other element of the list shall be:</p>
    268 <pre>
    269 <tt>"%s,%s", &lt;</tt><i>pathname</i><tt>&gt;, &lt;</tt><i>separator</i><tt>&gt;
    270 </tt></pre>
    271 <p>where, if there is not room for the next element of the list to fit within the current line length, &lt;<i>separator</i>&gt; is
    272 a string containing an optional &lt;space&gt; character and a mandatory &lt;newline&gt; character; otherwise it is a single
    273 &lt;space&gt; character.</p>
    274 <p>If the <b>-i</b> option is specified, the file's file serial number (see XBD <a href=
    275 "../basedefs/sys_stat.h.html"><i>&lt;sys/stat.h&gt;</i></a> ) shall be written in the following format before any other output for
    276 the corresponding entry:</p>
    277 <pre>
    278 <tt>%u ", &lt;</tt><i>file serial number</i><tt>&gt;
    279 </tt></pre>
    280 <p>If the <b>-l</b> option is specified, the following information shall be written for files other than character special and
    281 block special files:</p>
    282 <pre>
    283 <tt>"%s %u %s %s %u %s %s\n", &lt;</tt><i>file mode</i><tt>&gt;, &lt;</tt><i>number of links</i><tt>&gt;,
    284     &lt;</tt><i>owner name</i><tt>&gt;, &lt;</tt><i>group name</i><tt>&gt;, &lt;</tt><i>size</i><tt>&gt;, &lt;</tt><i>date and time</i><tt>&gt;,
    285     &lt;</tt><i>pathname</i><tt>&gt;
    286 </tt></pre>
    287 <p>If the <b>-l</b> option is specified, the following information shall be written for character special and block special
    288 files:</p>
    289 <pre>
    290 <tt>"%s %u %s %s %s %s %s\n", &lt;</tt><i>file mode</i><tt>&gt;, &lt;</tt><i>number of links</i><tt>&gt;,
    291     &lt;</tt><i>owner name</i><tt>&gt;, &lt;</tt><i>group name</i><tt>&gt;, &lt;</tt><i>device info</i><tt>&gt;, &lt;</tt><i>date and time</i><tt>&gt;,
    292     &lt;</tt><i>pathname</i><tt>&gt;
    293 </tt></pre>
    294 <p>In both cases if the file is a symbolic link and the <b>-L</b> option is also specified, this information shall be for the file
    295 resolved from the symbolic link, except that the &lt;<i>pathname</i>&gt; field shall contain the pathname of the symbolic link
    296 itself. If the file is a symbolic link and the <b>-L</b> option is not specified, this information shall be about the link itself
    297 and the &lt;<i>pathname</i>&gt; field shall be one of the following forms:</p>
    298 <ul>
    299 <li>
    300 <p><tt>"%s%sΔ-&gt;Δ%s", &lt;</tt><i>pathname of link</i><tt>&gt;, &lt;</tt><i>link type indicator</i><tt>&gt;, &lt;</tt><i>contents
    301 of link</i><tt>&gt;</tt></p>
    302 </li>
    303 <li>
    304 <p><tt>"%sΔ-&gt;Δ%s%s", &lt;</tt><i>pathname of link</i><tt>&gt;, &lt;</tt><i>contents of link</i><tt>&gt;, &lt;</tt><i>file type
    305 indicator</i><tt>&gt;</tt></p>
    306 </li>
    307 <li>
    308 <p><tt>"%s%sΔ-&gt;Δ%s%s", &lt;</tt><i>pathname of link</i><tt>&gt;, &lt;</tt><i>link type indicator</i><tt>&gt;,
    309 &lt;</tt><i>contents of link</i><tt>&gt;, &lt;</tt><i>file type indicator</i><tt>&gt;</tt></p>
    310 </li>
    311 </ul>
    312 <p>where &lt;<i>link type indicator</i>&gt; is a &lt;commercial-at&gt; (<tt>'@'</tt>) if the <b>-F</b> option is specified, or an
    313 empty string otherwise and &lt;<i>file type indicator</i>&gt; is the required indicator character, if any, for the file resolved
    314 from the symbolic link if the <b>-F</b> or <b>-p</b> option is specified, or an empty string otherwise. If pathname resolution
    315 fails when following the symbolic link, this shall not be treated as an error and the &lt;<i>file type indicator</i>&gt; field
    316 shall be an empty string.</p>
    317 <p>The <b>-n</b>, <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt=
    318 "[Option Start]" border="0"> <b>-g</b>, and <b>-o</b> <img src="../images/opt-end.gif" alt="[Option End]" border="0"> options use
    319 the same format as <b>-l</b>, but with omitted items and their associated &lt;blank&gt; characters. See the OPTIONS section.</p>
    320 <p>In both the preceding <b>-l</b> forms, if &lt;<i>owner name</i>&gt; or &lt;<i>group name</i>&gt; cannot be determined, or if
    321 <b>-n</b> is given, they shall be replaced with their associated numeric values using the format <tt>%u</tt>.</p>
    322 <p>The &lt;<i>size</i>&gt; field shall contain the value that would be returned for the file in the <i>st_size</i> field of
    323 <b>struct stat</b> (see XBD <a href="../basedefs/sys_stat.h.html"><i>&lt;sys/stat.h&gt;</i></a> ). Note that for some file types
    324 this value is unspecified.</p>
    325 <p>The &lt;<i>device&nbsp;info</i>&gt; field shall contain implementation-defined information associated with the device in
    326 question.</p>
    327 <p>The &lt;<i>date&nbsp;and&nbsp;time</i>&gt; field shall contain the appropriate date and timestamp of when the file was last
    328 modified. In the POSIX locale, the field shall be the equivalent of the output of the following <a href=
    329 "../utilities/date.html"><i>date</i></a> command:</p>
    330 <pre>
    331 <tt>date "+%b %e %H:%M"
    332 </tt></pre>
    333 <p>if the file has been modified in the last six months, or:</p>
    334 <pre>
    335 <tt>date "+%b %e %Y"
    336 </tt></pre>
    337 <p>(where two &lt;space&gt; characters are used between <tt>%e</tt> and <tt>%Y</tt>) if the file has not been modified in the last
    338 six months or if the modification date is in the future, except that, in both cases, the final &lt;newline&gt; produced by <a href=
    339 "../utilities/date.html"><i>date</i></a> shall not be included and the output shall be as if the <a href=
    340 "../utilities/date.html"><i>date</i></a> command were executed at the time of the last modification date of the file rather than
    341 the current time. When the <i>LC_TIME</i> locale category is not set to the POSIX locale, a different format and order of
    342 presentation of this field may be used.</p>
    343 <p>If the pathname was specified as a <i>file</i> operand, it shall be written as specified.</p>
    344 <p>The file mode written under the <b>-l</b>, <b>-n</b>, <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src=
    345 "../images/opt-start.gif" alt="[Option Start]" border="0"> <b>-g</b>, and <b>-o</b> <img src="../images/opt-end.gif" alt=
    346 "[Option End]" border="0"> options shall consist of the following format:</p>
    347 <pre>
    348 <tt>"%c%s%s%s%s", &lt;</tt><i>entry type</i><tt>&gt;, &lt;</tt><i>owner permissions</i><tt>&gt;,
    349     &lt;</tt><i>group permissions</i><tt>&gt;, &lt;</tt><i>other permissions</i><tt>&gt;,
    350     &lt;</tt><i>optional alternate access method flag</i><tt>&gt;
    351 </tt></pre>
    352 <p>The &lt;<i>optional&nbsp;alternate&nbsp;access&nbsp;method&nbsp;flag</i>&gt; shall be the empty string if there is no alternate
    353 or additional access control method associated with the file; otherwise, it shall be a string containing a single printable
    354 character that is not a &lt;blank&gt;.</p>
    355 <p>The &lt;<i>entry&nbsp;type</i>&gt; character shall describe the type of file, as follows:</p>
    356 <dl compact>
    357 <dd></dd>
    358 <dt><tt>d</tt></dt>
    359 <dd>Directory.</dd>
    360 <dt><tt>b</tt></dt>
    361 <dd>Block special file.</dd>
    362 <dt><tt>c</tt></dt>
    363 <dd>Character special file.</dd>
    364 <dt><tt>l</tt>&nbsp;(ell)</dt>
    365 <dd>Symbolic link.</dd>
    366 <dt><tt>p</tt></dt>
    367 <dd>FIFO.</dd>
    368 <dt><tt>s</tt></dt>
    369 <dd>Socket.</dd>
    370 <dt><tt>-</tt></dt>
    371 <dd>Regular file.</dd>
    372 </dl>
    373 <p>Implementations may add other characters to this list to represent other implementation-defined file types.</p>
    374 <p>The next three fields shall be three characters each:</p>
    375 <dl compact>
    376 <dd></dd>
    377 <dt>&lt;<i>owner permissions</i>&gt;</dt>
    378 <dd><br>
    379 Permissions for the file owner class (see XBD <a href="../basedefs/V1_chap04.html#tag_04_07"><i>4.7 File Access Permissions</i></a>
    380 ).</dd>
    381 <dt>&lt;<i>group permissions</i>&gt;</dt>
    382 <dd><br>
    383 Permissions for the file group class.</dd>
    384 <dt>&lt;<i>other permissions</i>&gt;</dt>
    385 <dd><br>
    386 Permissions for the file other class.</dd>
    387 </dl>
    388 <p>Each field shall have three character positions:</p>
    389 <ol>
    390 <li>
    391 <p>If <tt>'r'</tt>, the file is readable; if <tt>'-'</tt>, the file is not readable.</p>
    392 </li>
    393 <li>
    394 <p>If <tt>'w'</tt>, the file is writable; if <tt>'-'</tt>, the file is not writable.</p>
    395 </li>
    396 <li>
    397 <p>The first of the following that applies:</p>
    398 <dl compact>
    399 <dd></dd>
    400 <dt><tt>S</tt></dt>
    401 <dd>If in &lt;<i>owner&nbsp;permissions</i>&gt;, the file is not executable and set-user-ID mode is set. If in
    402 &lt;<i>group&nbsp;permissions</i>&gt;, the file is not executable and set-group-ID mode is set.</dd>
    403 <dt><tt>s</tt></dt>
    404 <dd>If in &lt;<i>owner&nbsp;permissions</i>&gt;, the file is executable and set-user-ID mode is set. If in
    405 &lt;<i>group&nbsp;permissions</i>&gt;, the file is executable and set-group-ID mode is set.</dd>
    406 <dt><tt>T</tt></dt>
    407 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    408 If in &lt;<i>other&nbsp;permissions</i>&gt; and the file is a directory, search permission is not granted to others, and the
    409 restricted deletion flag is set. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    410 <dt><tt>t</tt></dt>
    411 <dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    412 If in &lt;<i>other&nbsp;permissions</i>&gt; and the file is a directory, search permission is granted to others, and the restricted
    413 deletion flag is set. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd>
    414 <dt><tt>x</tt></dt>
    415 <dd>The file is executable or the directory is searchable.</dd>
    416 <dt><tt>-</tt></dt>
    417 <dd>None of the attributes of <tt>'S'</tt>, <tt>'s'</tt>, <tt>'T'</tt>, <tt>'t'</tt>, or <tt>'x'</tt> applies.</dd>
    418 </dl>
    419 <p>Implementations may add other characters to this list for the third character position. Such additions shall, however, be
    420 written in lowercase if the file is executable or searchable, and in uppercase if it is not.</p>
    421 </li>
    422 </ol>
    423 <p>If any of the <b>-l</b>, <b>-n</b>, <b>-s</b>, <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src=
    424 "../images/opt-start.gif" alt="[Option Start]" border="0"> <b>-g</b>, or <b>-o</b> <img src="../images/opt-end.gif" alt=
    425 "[Option End]" border="0"> options is specified, each list of files within a directory shall be preceded by a status line
    426 indicating the number of file system blocks occupied by the listed files for that directory in 512-byte units if the <b>-k</b>
    427 option is not specified, or 1024-byte units if the <b>-k</b> option is specified, rounded up to the next integral number of units,
    428 if necessary. In the POSIX locale, the format shall be:</p>
    429 <pre>
    430 <tt>"total %u\n", &lt;</tt><i>number of units in the directory</i><tt>&gt;
    431 </tt></pre>
    432 <p>If more than one directory, or a combination of non-directory files and directories are written, either as a result of
    433 specifying multiple operands, or the <b>-R</b> option, each list of files within a directory shall be preceded by:</p>
    434 <pre>
    435 <tt>"\n%s:\n", &lt;</tt><i>directory name</i><tt>&gt;
    436 </tt></pre>
    437 <p>The above string may be omitted for the directory named by the operand if only one operand is present. It may also be omitted
    438 for dot (<tt>'.'</tt>) if no operands are present. If this string is the first thing to be written, the first &lt;newline&gt; shall
    439 not be written. This output shall precede the number of units in the directory.</p>
    440 <p>If the <b>-s</b> option is given, each file shall be written with the number of blocks used by the file. Along with <b>-C</b>,
    441 <b>-1</b>, <b>-m</b>, or <b>-x</b>, the number and a &lt;space&gt; shall precede the filename; with <b>-l</b>, <b>-n</b>,
    442 <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">
    443 <b>-g</b>, or <b>-o</b>, <img src="../images/opt-end.gif" alt="[Option End]" border="0"> they shall precede each line describing a
    444 file.</p>
    445 </blockquote>
    446 <h4 class="mansect"><a name="tag_20_73_11" id="tag_20_73_11"></a>STDERR</h4>
    447 <blockquote>
    448 <p>The standard error shall be used only for diagnostic messages.</p>
    449 </blockquote>
    450 <h4 class="mansect"><a name="tag_20_73_12" id="tag_20_73_12"></a>OUTPUT FILES</h4>
    451 <blockquote>
    452 <p>None.</p>
    453 </blockquote>
    454 <h4 class="mansect"><a name="tag_20_73_13" id="tag_20_73_13"></a>EXTENDED DESCRIPTION</h4>
    455 <blockquote>
    456 <p>None.</p>
    457 </blockquote>
    458 <h4 class="mansect"><a name="tag_20_73_14" id="tag_20_73_14"></a>EXIT STATUS</h4>
    459 <blockquote>
    460 <p>The following exit values shall be returned:</p>
    461 <dl compact>
    462 <dd></dd>
    463 <dt>&nbsp;0</dt>
    464 <dd>Successful completion.</dd>
    465 <dt>&gt;0</dt>
    466 <dd>An error occurred.</dd>
    467 </dl>
    468 </blockquote>
    469 <h4 class="mansect"><a name="tag_20_73_15" id="tag_20_73_15"></a>CONSEQUENCES OF ERRORS</h4>
    470 <blockquote>
    471 <p>Default.</p>
    472 </blockquote>
    473 <hr>
    474 <div class="box"><em>The following sections are informative.</em></div>
    475 <h4 class="mansect"><a name="tag_20_73_16" id="tag_20_73_16"></a>APPLICATION USAGE</h4>
    476 <blockquote>
    477 <p>It is difficult for an application to use every part of the file modes field of <i>ls</i> <b>-l</b> in a portable manner.
    478 Certain file types and executable bits are not guaranteed to be exactly as shown, as implementations may have extensions.
    479 Applications can use this field to pass directly to a user printout or prompt, but actions based on its contents should generally
    480 be deferred, instead, to the <a href="../utilities/test.html"><i>test</i></a> utility.</p>
    481 <p>The output of <i>ls</i> (with the <b>-l</b> and related options) contains information that logically could be used by utilities
    482 such as <a href="../utilities/chmod.html"><i>chmod</i></a> and <a href="../utilities/touch.html"><i>touch</i></a> to restore files
    483 to a known state. However, this information is presented in a format that cannot be used directly by those utilities or be easily
    484 translated into a format that can be used. A character has been added to the end of the permissions string so that applications at
    485 least have an indication that they may be working in an area they do not understand instead of assuming that they can translate the
    486 permissions string into something that can be used. Future versions or related documents may define one or more specific characters
    487 to be used based on different standard additional or alternative access control mechanisms.</p>
    488 <p>As with many of the utilities that deal with filenames, the output of <i>ls</i> for multiple files or in one of the long listing
    489 formats must be used carefully on systems where filenames can contain embedded white space. Systems and system administrators
    490 should institute policies and user training to limit the use of such filenames.</p>
    491 <p>The number of disk blocks occupied by the file that it reports varies depending on underlying file system type, block size units
    492 reported, and the method of calculating the number of blocks. On some file system types, the number is the actual number of blocks
    493 occupied by the file (counting indirect blocks and ignoring holes in the file); on others it is calculated based on the file size
    494 (usually making an allowance for indirect blocks, but ignoring holes).</p>
    495 <p>The <tt>total</tt> number provided when using <i>ls</i> <b>-l</b> does not necessarily correspond to the space that would be
    496 reclaimed if all the listed files were removed, because of hard links (and symbolic links if <b>-L</b> is present). The space for
    497 each listed file is counted in the total regardless of any relationship between the files.</p>
    498 </blockquote>
    499 <h4 class="mansect"><a name="tag_20_73_17" id="tag_20_73_17"></a>EXAMPLES</h4>
    500 <blockquote>
    501 <p>An example of a small directory tree being fully listed with <i>ls</i> <b>-laRF&nbsp;a</b> in the POSIX locale:</p>
    502 <pre>
    503 <tt>a:
    504 total 11
    505 drwxr-xr-x   3 fox      prog          64 Jul  4 12:07 ./
    506 drwxrwxrwx   4 fox      prog        3264 Jul  4 12:09 ../
    507 drwxr-xr-x   2 fox      prog          48 Jul  4 12:07 b/
    508 -rwxr--r--   1 fox      prog         572 Jul  4 12:07 foo*
    509 <br>
    510 a/b:
    511 total 4
    512 drwxr-xr-x   2 fox      prog          48 Jul  4 12:07 ./
    513 drwxr-xr-x   3 fox      prog          64 Jul  4 12:07 ../
    514 -rw-r--r--   1 fox      prog         700 Jul  4 12:07 bar
    515 </tt></pre>
    516 <p>where the <tt>"a:"</tt> line may be omitted by some implementations.</p>
    517 </blockquote>
    518 <h4 class="mansect"><a name="tag_20_73_18" id="tag_20_73_18"></a>RATIONALE</h4>
    519 <blockquote>
    520 <p>Some historical implementations of the <i>ls</i> utility show all entries in a directory except dot and dot-dot when a superuser
    521 invokes <i>ls</i> without specifying the <b>-a</b> option. When &quot;normal&quot; users invoke <i>ls</i> without specifying <b>-a</b>,
    522 they should not see information about any files with names beginning with a &lt;period&gt; unless they were named as <i>file</i>
    523 operands.</p>
    524 <p>Implementations are expected to traverse arbitrary depths when processing the <b>-R</b> option. The only limitation on depth
    525 should be based on running out of physical storage for keeping track of untraversed directories.</p>
    526 <p>The <b>-1</b> (one) option was historically found in BSD and BSD-derived implementations only. It is required in this volume of
    527 POSIX.1-2024 so that conforming applications might ensure that output is one entry per line, even if the output is to a
    528 terminal.</p>
    529 <p>The <b>-S</b> option was added in Issue 7, but had been provided by several implementations for many years. The description
    530 given in the standard documents historic practice, but does not match much of the documentation that described its behavior.
    531 Historical documentation typically described it as something like:</p>
    532 <dl compact>
    533 <dd></dd>
    534 <dt><b>-S</b></dt>
    535 <dd>Sort by size (largest size first) instead of by name. Special character devices (listed last) are sorted by name.</dd>
    536 </dl>
    537 <p>even though the file type was never considered when sorting the output. Character special files do typically sort close to the
    538 end of the list because their file size on most implementations is zero. But they are sorted alphabetically with any other files
    539 that happen to have the same file size (zero), not sorted separately and added to the end.</p>
    540 <p>This volume of POSIX.1-2024 is frequently silent about what happens when mutually-exclusive options are specified. Except for
    541 <b>-R</b>, <b>-d</b>, and <b>-f</b>, the <i>ls</i> utility is required to accept multiple options from each mutually-exclusive
    542 option set without treating them as errors and to use the behavior specified by the last option given in each mutually-exclusive
    543 set. Since <i>ls</i> is one of the most aliased commands, it is important that the implementation perform intuitively. For example,
    544 if the alias were:</p>
    545 <pre>
    546 <tt>alias ls="ls -C"
    547 </tt></pre>
    548 <p>and the user typed <i>ls</i> <b>-1</b> (one), single-text-column output should result, not an error.</p>
    549 <p>The <b>-g</b>, <b>-l</b> (ell), <b>-n</b>, and <b>-o</b> options are not mutually-exclusive options. They all enable long format
    550 output. They work together to determine whether the file's owner is written (no if <b>-g</b> is present), file's group is written
    551 (no if <b>-o</b> is present), and if the file's group or owner is written whether it is written as the name (default) or a string
    552 representation of the UID or GID number (if <b>-n</b> is present). The <b>-C</b>, <b>-m</b>, <b>-x</b>, and <b>-1</b> (one) are
    553 mutually-exclusive options and the first three of these disable long format output. The <b>-1</b> (one) option does not directly
    554 change whether or not long format output is enabled, but by overriding <b>-C</b>, <b>-m</b>, and <b>-x</b>, it can re-enable long
    555 format output that had been disabled by one of these options.</p>
    556 <p>Earlier versions of this standard did not describe the BSD <b>-A</b> option (like <b>-a</b>, but dot and dot-dot are not written
    557 out). It has been added due to widespread implementation.</p>
    558 <p>Implementations may make <b>-q</b> the default for terminals to prevent trojan horse attacks on terminals with special escape
    559 sequences. This is not required because:</p>
    560 <ul>
    561 <li>
    562 <p>Some control characters may be useful on some terminals; for example, a system might write them as <tt>"\001"</tt> or
    563 <tt>"^A"</tt>.</p>
    564 </li>
    565 <li>
    566 <p>Special behavior for terminals is not relevant to applications portability.</p>
    567 </li>
    568 </ul>
    569 <p>An early proposal specified that the &lt;<i>optional&nbsp;alternate&nbsp;access&nbsp;method&nbsp;flag</i>&gt; had to be
    570 <tt>'+'</tt> if there was an alternate access method used on the file or &lt;space&gt; if there was not. This was changed to be
    571 &lt;space&gt; if there is not and a single printable character if there is. This was done for three reasons:</p>
    572 <ol>
    573 <li>
    574 <p>There are historical implementations using characters other than <tt>'+'</tt>.</p>
    575 </li>
    576 <li>
    577 <p>There are implementations that vary this character used in that position to distinguish between various alternate access methods
    578 in use.</p>
    579 </li>
    580 <li>
    581 <p>The standard developers did not want to preclude future specifications that might need a way to specify more than one alternate
    582 access method.</p>
    583 </li>
    584 </ol>
    585 <p>Nonetheless, implementations providing a single alternate access method are encouraged to use <tt>'+'</tt>.</p>
    586 <p>Earlier versions of this standard did not have the <b>-k</b> option, which meant that the <b>-s</b> option could not be used
    587 portably as its block size was implementation-defined, and the units used to specify the number of blocks occupied by files in a
    588 directory in an <i>ls</i> <b>-l</b> listing were fixed as 512-byte units. The <b>-k</b> option has been added to provide a way for
    589 the <b>-s</b> option to be used portably, and for consistency it also changes the aforementioned units from 512-byte to
    590 1024-byte.</p>
    591 <p>The &lt;<i>date&nbsp;and&nbsp;time</i>&gt; field in the <b>-l</b> format is specified only for the POSIX locale. As noted, the
    592 format can be different in other locales. No mechanism for defining this is present in this volume of POSIX.1-2024, as the
    593 appropriate vehicle is a messaging system; that is, the format should be specified as a &quot;message&quot;.</p>
    594 </blockquote>
    595 <h4 class="mansect"><a name="tag_20_73_19" id="tag_20_73_19"></a>FUTURE DIRECTIONS</h4>
    596 <blockquote>
    597 <p>If this utility is directed to display a pathname that contains any bytes that have the encoded value of a &lt;newline&gt;
    598 character when &lt;newline&gt; is a terminator or separator in the output format being used, implementations are encouraged to
    599 treat this as an error. A future version of this standard may require implementations to treat this as an error.</p>
    600 <p>Allowing <b>-f</b> to ignore the <b>-A</b>, <b>-g</b>, <b>-l</b>, <b>-n</b>, <b>-o</b>, and <b>-s</b> options may be removed in
    601 a future version.</p>
    602 </blockquote>
    603 <h4 class="mansect"><a name="tag_20_73_20" id="tag_20_73_20"></a>SEE ALSO</h4>
    604 <blockquote>
    605 <p><a href="../utilities/chmod.html#tag_20_17"><i>chmod</i></a> , <a href="../utilities/find.html#"><i>find</i></a> , <a href=
    606 "../utilities/readlink.html#tag_20_101"><i>readlink</i></a></p>
    607 <p>XBD <a href="../basedefs/V1_chap07.html#tag_07_03_02"><i>7.3.2 LC_COLLATE</i></a> , <a href=
    608 "../basedefs/V1_chap04.html#tag_04_07"><i>4.7 File Access Permissions</i></a> , <a href="../basedefs/V1_chap08.html#tag_08"><i>8.
    609 Environment Variables</i></a> , <a href="../basedefs/V1_chap12.html#tag_12_02"><i>12.2 Utility Syntax Guidelines</i></a> , <a href=
    610 "../basedefs/sys_stat.h.html"><i>&lt;sys/stat.h&gt;</i></a></p>
    611 <p>XSH <a href="../functions/fstatat.html#"><i>fstatat</i></a></p>
    612 </blockquote>
    613 <h4 class="mansect"><a name="tag_20_73_21" id="tag_20_73_21"></a>CHANGE HISTORY</h4>
    614 <blockquote>
    615 <p>First released in Issue 2.</p>
    616 </blockquote>
    617 <h4 class="mansect"><a name="tag_20_73_22" id="tag_20_73_22"></a>Issue 5</h4>
    618 <blockquote>
    619 <p>A second FUTURE DIRECTION is added.</p>
    620 </blockquote>
    621 <h4 class="mansect"><a name="tag_20_73_23" id="tag_20_73_23"></a>Issue 6</h4>
    622 <blockquote>
    623 <p>The following new requirements on POSIX implementations derive from alignment with the Single UNIX Specification:</p>
    624 <ul>
    625 <li>
    626 <p>In the <b>-F</b> option, other symbols are allowed for other file types.</p>
    627 </li>
    628 </ul>
    629 <p>Treatment of symbolic links is added, as defined in the IEEE&nbsp;P1003.2b draft standard.</p>
    630 <p>The Open Group Base Resolution bwg2001-010 is applied, adding the <tt>T</tt> and <tt>t</tt> fields as part of the XSI
    631 option.</p>
    632 </blockquote>
    633 <h4 class="mansect"><a name="tag_20_73_24" id="tag_20_73_24"></a>Issue 7</h4>
    634 <blockquote>
    635 <p>Austin Group Interpretation 1003.1-2001 #101 is applied, clarifying the optional alternate access method flag in the STDOUT
    636 section.</p>
    637 <p>Austin Group Interpretation 1003.1-2001 #128 is applied, clarifying the DESCRIPTION and the definition of the <b>-R</b>
    638 option.</p>
    639 <p>Austin Group Interpretation 1003.1-2001 #129 is applied, clarifying the behavior of <i>ls</i> when no operands are
    640 specified.</p>
    641 <p>Austin Group Interpretation 1003.1-2001 #198 is applied, clarifying the requirements for the <b>-H</b> option.</p>
    642 <p>SD5-XCU-ERN-50 is applied, adding the <b>-A</b> option.</p>
    643 <p>SD5-XCU-ERN-97 is applied, updating the SYNOPSIS.</p>
    644 <p>The <b>-S</b> option is added from The Open Group Technical Standard, 2006, Extended API Set Part&nbsp;1.</p>
    645 <p>The <b>-f</b>, <b>-m</b>, <b>-n</b>, <b>-p</b>, <b>-s</b>, and <b>-x</b> options are moved from the XSI option to the Base.</p>
    646 <p>The description of the <b>-f</b>, <b>-s</b>, and <b>-t</b> options are revised and the <b>-k</b> option is added.</p>
    647 <p>POSIX.1-2008, Technical Corrigendum 1, XCU/TC1-2008/0098 [424], XCU/TC1-2008/0099 [424], XCU/TC1-2008/0100 [424],
    648 XCU/TC1-2008/0101 [424], XCU/TC1-2008/0102 [424], XCU/TC1-2008/0103 [424], XCU/TC1-2008/0104 [424], XCU/TC1-2008/0105 [423,424],
    649 XCU/TC1-2008/0106 [424], XCU/TC1-2008/0107 [424], XCU/TC1-2008/0108 [424], XCU/TC1-2008/0109 [424], XCU/TC1-2008/0110 [424],
    650 XCU/TC1-2008/0111 [423], XCU/TC1-2008/0112 [117], XCU/TC1-2008/0113 [117], XCU/TC1-2008/0114 [117], XCU/TC1-2008/0115 [424], and
    651 XCU/TC1-2008/0116 [424] are applied.</p>
    652 <p>POSIX.1-2008, Technical Corrigendum 2, XCU/TC2-2008/0115 [963] and XCU/TC2-2008/0116 [963] are applied.</p>
    653 </blockquote>
    654 <h4 class="mansect"><a name="tag_20_73_25" id="tag_20_73_25"></a>Issue 8</h4>
    655 <blockquote>
    656 <p>Austin Group Defect 251 is applied, encouraging implementations to report an error if a utility is directed to display a
    657 pathname that contains any bytes that have the encoded value of a &lt;newline&gt; character when &lt;newline&gt; is a terminator or
    658 separator in the output format being used.</p>
    659 <p>Austin Group Defect 1023 is applied, clarifying the <b>-R</b> option with respect to subdirectory filenames beginning with a
    660 &lt;period&gt;.</p>
    661 <p>Austin Group Defect 1070 is applied, requiring that any filenames or pathnames that collate equally are further compared
    662 byte-by-byte using the collating sequence for the POSIX locale.</p>
    663 <p>Austin Group Defect 1122 is applied, changing the description of <i>NLSPATH .</i></p>
    664 <p>Austin Group Defect 1146 is applied, clarifying the requirements for the status line written by <i>ls</i> <b>-l</b>.</p>
    665 <p>Austin Group Defect 1147 is applied, clarifying the requirements for trailing file type indicators (such as <tt>'/'</tt> for a
    666 directory).</p>
    667 <p>Austin Group Defect 1148 is applied, clarifying the behavior of the <b>-S</b> option for symbolic links.</p>
    668 <p>Austin Group Defect 1149 is applied, inserting a comma in the description of the <b>-r</b> option.</p>
    669 <p>Austin Group Defect 1185 is applied, changing the <i>COLUMNS</i> entry in ENVIRONMENT VARIABLES.</p>
    670 <p>Austin Group Defect 1217 is applied, adding file type indicators for sockets.</p>
    671 <p>Austin Group Defect 1261 is applied, changing the STDOUT and EXAMPLES sections in relation to the <tt>&lt;</tt><i>directory
    672 name</i><tt>&gt;</tt> output.</p>
    673 <p>Austin Group Defect 1457 is applied, adding <a href="../utilities/readlink.html"><i>readlink</i></a> to the SEE ALSO
    674 section.</p>
    675 <p>Austin Group Defect 1703 is applied, changing &quot;at-sign&quot; to &quot;&lt;commercial-at&gt;&quot;.</p>
    676 </blockquote>
    677 <div class="box"><em>End of informative text.</em></div>
    678 <hr>
    679 <p>&nbsp;</p>
    680 <a href="#top"><span class="topOfPage">return to top of page</span></a><br>
    681 <hr size="2" noshade>
    682 <center><font size="2">UNIX® is a registered Trademark of The Open Group.<br>
    683 POSIX™ is a Trademark of The IEEE.<br>
    684 Copyright © 2001-2024 The IEEE and The Open Group, All Rights Reserved<br>
    685 [ <a href="../mindex.html">Main Index</a> | <a href="../basedefs/contents.html">XBD</a> | <a href=
    686 "../functions/contents.html">XSH</a> | <a href="../utilities/contents.html">XCU</a> | <a href="../xrat/contents.html">XRAT</a>
    687 ]</font></center>
    688 <hr size="2" noshade>
    689 <div class="NAVHEADER">
    690 <table summary="Header navigation table" class="nav" width="100%" border="0" cellpadding="0" cellspacing="0">
    691 <tr class="nav">
    692 <td class="nav" width="15%" align="left" valign="bottom"><a href="../utilities/lp.html" accesskey="P">&lt;&lt;&lt;
    693 Previous</a></td>
    694 <td class="nav" width="70%" align="center" valign="bottom"><a href="contents.html">Home</a></td>
    695 <td class="nav" width="15%" align="right" valign="bottom"><a href="../utilities/m4.html" accesskey="N">Next &gt;&gt;&gt;</a></td>
    696 </tr>
    697 </table>
    698 <hr align="left" width="100%"></div>
    699 </body>
    700 </html>