⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ls.html

📁 IEEE 1003.1-2003, Single Unix Specification v3
💻 HTML
📖 第 1 页 / 共 3 页
字号:
Determine the locale for character collation information in determining the pathname collation sequence.</dd><dt><i>LC_CTYPE</i></dt><dd>Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte asopposed to multi-byte characters in arguments) and which characters are defined as printable (character class <b>print</b>).</dd><dt><i>LC_MESSAGES</i></dt><dd>Determine the locale that should be used to affect the format and contents of diagnostic messages written to standarderror.</dd><dt><i>LC_TIME</i></dt><dd>Determine the format and contents for date and time strings written by <i>ls</i>.</dd><dt><i>NLSPATH</i></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">Determine the location of message catalogs for the processing of <i>LC_MESSAGES .</i> <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><i>TZ</i></dt><dd>Determine the timezone for date and time strings written by <i>ls</i>. If <i>TZ</i> is unset or null, an unspecified defaulttimezone shall be used.</dd></dl></blockquote><h4><a name="tag_04_81_09"></a>ASYNCHRONOUS EVENTS</h4><blockquote><p>Default.</p></blockquote><h4><a name="tag_04_81_10"></a>STDOUT</h4><blockquote><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<b>-C</b>, <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]"border="0"> <b>-m</b>, or <b>-x</b> <img src="../images/opt-end.gif" alt="[Option End]" border="0"> options is specified. If theoutput is to a terminal, the format is implementation-defined.</p><p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">When <b>-m</b> is specified, the format used shall be:</p><pre><tt>"%s, %s, ...\n", &lt;</tt><i>filename1</i><tt>&gt;, &lt;</tt><i>filename2</i><tt>&gt;</tt></pre><p>where the largest number of filenames shall be written without exceeding the length of the line. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p><p>If the <b>-i</b> option is specified, the file's file serial number (see <a href="../basedefs/sys/stat.h.html"><i>&lt;sys/stat.h&gt;</i></a>) shall be written in the following format before any other output forthe corresponding entry:</p><pre><tt>%u ", &lt;</tt><i>file serial number</i><tt>&gt;</tt></pre><p>If the <b>-l</b> option is specified without <b>-L</b>, the following information shall be written:</p><pre><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;,    &lt;</tt><i>owner name</i><tt>&gt;, &lt;</tt><i>group name</i><tt>&gt;, &lt;</tt><i>number of bytes in the file</i><tt>&gt;,    &lt;</tt><i>date and time</i><tt>&gt;, &lt;</tt><i>pathname</i><tt>&gt;</tt></pre><p>If the file is a symbolic link, this information shall be about the link itself and the &lt;<i>pathname</i>&gt; field shall beof the form:</p><pre><tt>"%s -&gt; %s", &lt;</tt><i>pathname of link</i><tt>&gt;, &lt;</tt><i>contents of link</i><tt>&gt;</tt></pre><p>If both <b>-l</b> and <b>-L</b> are specified, the following information shall be written:</p><pre><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;,    &lt;</tt><i>owner name</i><tt>&gt;, &lt;</tt><i>group name</i><tt>&gt;, &lt;</tt><i>number of bytes in the file</i><tt>&gt;,    &lt;</tt><i>date and time</i><tt>&gt;, &lt;</tt><i>pathname of link</i><tt>&gt;</tt></pre><p>where all fields except &lt;<i>pathname of link</i>&gt; shall be for the file resolved from the symbolic link.</p><p><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">The <b>-g</b>, <b>-n</b>, and <b>-o</b> options use the same format as <b>-l</b>, but with omitted items and their associated&lt;blank&gt;s. See the OPTIONS section. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></p><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, <sup>[<ahref="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> &nbsp;or if<b>-n</b> is given, <img src="../images/opt-end.gif" alt="[Option End]" border="0"> they shall be replaced with their associatednumeric values using the format <tt>%u</tt> .</p><p>The &lt;<i>date&nbsp;and&nbsp;time</i>&gt; field shall contain the appropriate date and timestamp of when the file was lastmodified. In the POSIX locale, the field shall be the equivalent of the output of the following <a href="../utilities/date.html"><i>date</i></a> command:</p><pre><tt>date "+%b %e %H:%M"</tt></pre><p>if the file has been modified in the last six months, or:</p><pre><tt>date "+%b %e %Y"</tt></pre><p>(where two &lt;space&gt;s are used between <tt>%e</tt> and <tt>%Y</tt> ) if the file has not been modified in the last sixmonths or if the modification date is in the future, except that, in both cases, the final &lt;newline&gt; produced by <a href="../utilities/date.html"><i>date</i></a> shall not be included and the output shall be as if the <a href="../utilities/date.html"><i>date</i></a> command were executed at the time of the last modification date of the file rather thanthe current time. When the <i>LC_TIME</i> locale category is not set to the POSIX locale, a different format and order ofpresentation of this field may be used.</p><p>If the file is a character special or block special file, the size of the file may be replaced with implementation-definedinformation associated with the device in question.</p><p>If the pathname was specified as a <i>file</i> operand, it shall be written as specified.</p><p>The file mode written under the <b>-l</b>, <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> <b>-g</b>, <b>-n</b>, and <b>-o</b> <img src="../images/opt-end.gif"alt="[Option End]" border="0"> options shall consist of the following format:</p><pre><tt>"%c%s%s%s%c", &lt;</tt><i>entry type</i><tt>&gt;, &lt;</tt><i>owner permissions</i><tt>&gt;,    &lt;</tt><i>group permissions</i><tt>&gt;, &lt;</tt><i>other permissions</i><tt>&gt;,    &lt;</tt><i>optional alternate access method flag</i><tt>&gt;</tt></pre><p>The &lt;<i>optional&nbsp;alternate&nbsp;access&nbsp;method&nbsp;flag</i>&gt; shall be a single &lt;space&gt; if there is noalternate or additional access control method associated with the file; otherwise, a printable character shall be used.</p><p>The &lt;<i>entry&nbsp;type</i>&gt; character shall describe the type of file, as follows:</p><dl compact><dt><tt>d</tt></dt><dd>Directory.</dd><dt><tt>b</tt></dt><dd>Block special file.</dd><dt><tt>c</tt></dt><dd>Character special file.</dd><dt><tt>l</tt>&nbsp;(ell)</dt><dd>Symbolic link.</dd><dt><tt>p</tt></dt><dd>FIFO.</dd><dt><tt>-</tt></dt><dd>Regular file.</dd></dl><p>Implementations may add other characters to this list to represent other implementation-defined file types.</p><p>The next three fields shall be three characters each:</p><dl compact><dt>&lt;<i>owner permissions</i>&gt;</dt><dd><br>Permissions for the file owner class (see the Base Definitions volume of IEEE&nbsp;Std&nbsp;1003.1-2001, <a href="../basedefs/xbd_chap04.html#tag_04_04">Section 4.4, File Access Permissions</a>).</dd><dt>&lt;<i>group permissions</i>&gt;</dt><dd><br>Permissions for the file group class.</dd><dt>&lt;<i>other permissions</i>&gt;</dt><dd><br>Permissions for the file other class.</dd></dl><p>Each field shall have three character positions:</p><ol><li><p>If <tt>'r'</tt> , the file is readable; if <tt>'-'</tt> , the file is not readable.</p></li><li><p>If <tt>'w'</tt> , the file is writable; if <tt>'-'</tt> , the file is not writable.</p></li><li><p>The first of the following that applies:</p><dl compact><dt><tt>S</tt></dt><dd>If in &lt;<i>owner&nbsp;permissions</i>&gt;, the file is not executable and set-user-ID mode is set. If in&lt;<i>group&nbsp;permissions</i>&gt;, the file is not executable and set-group-ID mode is set.</dd><dt><tt>s</tt></dt><dd>If in &lt;<i>owner&nbsp;permissions</i>&gt;, the file is executable and set-user-ID mode is set. If in&lt;<i>group&nbsp;permissions</i>&gt;, the file is executable and set-group-ID mode is set.</dd><dt><tt>T</tt></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">If in &lt;<i>other&nbsp;permissions</i>&gt; and the file is a directory, search permission is not granted to others, and therestricted deletion flag is set. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><tt>t</tt></dt><dd><sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0">If in &lt;<i>other&nbsp;permissions</i>&gt; and the file is a directory, search permission is granted to others, and the restricteddeletion flag is set. <img src="../images/opt-end.gif" alt="[Option End]" border="0"></dd><dt><tt>x</tt></dt><dd>The file is executable or the directory is searchable.</dd><dt><tt>-</tt></dt><dd>None of the attributes of <tt>'S'</tt> , <tt>'s'</tt> , <tt>'T'</tt> , <tt>'t'</tt> , or <tt>'x'</tt> applies.</dd></dl><p>Implementations may add other characters to this list for the third character position. Such additions shall, however, bewritten in lowercase if the file is executable or searchable, and in uppercase if it is not.</p></li></ol><p>If any of the <b>-l</b>, <sup>[<a href="javascript:open_code('XSI')">XSI</a>]</sup> <img src="../images/opt-start.gif" alt="[Option Start]" border="0"> <b>-g</b>, <b>-n</b>, <b>-o</b>, or <b>-s</b> <img src="../images/opt-end.gif" alt="[Option End]"border="0"> options is specified, each list of files within the directory shall be preceded by a status line indicating the numberof file system blocks occupied by files in the directory in 512-byte units, rounded up to the next integral number of units, ifnecessary. In the POSIX locale, the format shall be:</p><pre><tt>"total %u\n", &lt;</tt><i>number of units in the directory</i><tt>&gt;</tt></pre>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -