Experimenting with making pretty man pages on paper.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

214 lines
10 KiB

<h1>NAME</h1>
<p>ls - list directory contents</p>
<h1>SYNOPSIS</h1>
<p><strong>ls</strong> [<em>OPTION</em>]... [<em>FILE</em>]...</p>
<h1>DESCRIPTION</h1>
<p>List information about the FILEs (the current directory by default). Sort entries alphabetically if none of <strong>-cftuvSUX</strong> nor <strong>--sort</strong> is specified.</p>
<p>Mandatory arguments to long options are mandatory for short options too.</p>
<dl>
<dt><strong>-a</strong>, <strong>--all</strong></dt>
<dd><p>do not ignore entries starting with .</p>
</dd>
<dt><strong>-A</strong>, <strong>--almost-all</strong></dt>
<dd><p>do not list implied . and ..</p>
</dd>
<dt><strong>--author</strong></dt>
<dd><p>with <strong>-l</strong>, print the author of each file</p>
</dd>
<dt><strong>-b</strong>, <strong>--escape</strong></dt>
<dd><p>print C-style escapes for nongraphic characters</p>
</dd>
<dt><strong>--block-size</strong>=<em>SIZE</em></dt>
<dd><p>with <strong>-l</strong>, scale sizes by SIZE when printing them; e.g., '--block-size=M'; see SIZE format below</p>
</dd>
<dt><strong>-B</strong>, <strong>--ignore-backups</strong></dt>
<dd><p>do not list implied entries ending with ~</p>
</dd>
<dt><strong>-c</strong></dt>
<dd><p>with <strong>-lt</strong>: sort by, and show, ctime (time of last modification of file status information); with <strong>-l</strong>: show ctime and sort by name; otherwise: sort by ctime, newest first</p>
</dd>
<dt><strong>-C</strong></dt>
<dd><p>list entries by columns</p>
</dd>
<dt><strong>--color</strong>[=<em>WHEN</em>]</dt>
<dd><p>colorize the output; WHEN can be 'always' (default if omitted), 'auto', or 'never'; more info below</p>
</dd>
<dt><strong>-d</strong>, <strong>--directory</strong></dt>
<dd><p>list directories themselves, not their contents</p>
</dd>
<dt><strong>-D</strong>, <strong>--dired</strong></dt>
<dd><p>generate output designed for Emacs' dired mode</p>
</dd>
<dt><strong>-f</strong></dt>
<dd><p>do not sort, enable <strong>-aU</strong>, disable <strong>-ls</strong> <strong>--color</strong></p>
</dd>
<dt><strong>-F</strong>, <strong>--classify</strong></dt>
<dd><p>append indicator (one of */=&gt;@|) to entries</p>
</dd>
<dt><strong>--file-type</strong></dt>
<dd><p>likewise, except do not append '*'</p>
</dd>
<dt><strong>--format</strong>=<em>WORD</em></dt>
<dd><p>across <strong>-x</strong>, commas <strong>-m</strong>, horizontal <strong>-x</strong>, long <strong>-l</strong>, single-column <strong>-1</strong>, verbose <strong>-l</strong>, vertical <strong>-C</strong></p>
</dd>
<dt><strong>--full-time</strong></dt>
<dd><p>like <strong>-l</strong> <strong>--time-style</strong>=<em>full-iso</em></p>
</dd>
<dt><strong>-g</strong></dt>
<dd><p>like <strong>-l</strong>, but do not list owner</p>
</dd>
<dt><strong>--group-directories-first</strong></dt>
<dd><p>group directories before files;</p>
<p>can be augmented with a <strong>--sort</strong> option, but any use of <strong>--sort</strong>=<em>none</em> (<strong>-U</strong>) disables grouping</p>
</dd>
<dt><strong>-G</strong>, <strong>--no-group</strong></dt>
<dd><p>in a long listing, don't print group names</p>
</dd>
<dt><strong>-h</strong>, <strong>--human-readable</strong></dt>
<dd><p>with <strong>-l</strong> and <strong>-s</strong>, print sizes like 1K 234M 2G etc.</p>
</dd>
<dt><strong>--si</strong></dt>
<dd><p>likewise, but use powers of 1000 not 1024</p>
</dd>
<dt><strong>-H</strong>, <strong>--dereference-command-line</strong></dt>
<dd><p>follow symbolic links listed on the command line</p>
</dd>
<dt><strong>--dereference-command-line-symlink-to-dir</strong></dt>
<dd><p>follow each command line symbolic link</p>
<p>that points to a directory</p>
</dd>
<dt><strong>--hide</strong>=<em>PATTERN</em></dt>
<dd><p>do not list implied entries matching shell PATTERN (overridden by <strong>-a</strong> or <strong>-A</strong>)</p>
</dd>
<dt><strong>--hyperlink</strong>[=<em>WHEN</em>]</dt>
<dd><p>hyperlink file names; WHEN can be 'always' (default if omitted), 'auto', or 'never'</p>
</dd>
<dt><strong>--indicator-style</strong>=<em>WORD</em></dt>
<dd><p>append indicator with style WORD to entry names: none (default), slash (<strong>-p</strong>), file-type (<strong>--file-type</strong>), classify (<strong>-F</strong>)</p>
</dd>
<dt><strong>-i</strong>, <strong>--inode</strong></dt>
<dd><p>print the index number of each file</p>
</dd>
<dt><strong>-I</strong>, <strong>--ignore</strong>=<em>PATTERN</em></dt>
<dd><p>do not list implied entries matching shell PATTERN</p>
</dd>
<dt><strong>-k</strong>, <strong>--kibibytes</strong></dt>
<dd><p>default to 1024-byte blocks for disk usage; used only with <strong>-s</strong> and per directory totals</p>
</dd>
<dt><strong>-l</strong></dt>
<dd><p>use a long listing format</p>
</dd>
<dt><strong>-L</strong>, <strong>--dereference</strong></dt>
<dd><p>when showing file information for a symbolic link, show information for the file the link references rather than for the link itself</p>
</dd>
<dt><strong>-m</strong></dt>
<dd><p>fill width with a comma separated list of entries</p>
</dd>
<dt><strong>-n</strong>, <strong>--numeric-uid-gid</strong></dt>
<dd><p>like <strong>-l</strong>, but list numeric user and group IDs</p>
</dd>
<dt><strong>-N</strong>, <strong>--literal</strong></dt>
<dd><p>print entry names without quoting</p>
</dd>
<dt><strong>-o</strong></dt>
<dd><p>like <strong>-l</strong>, but do not list group information</p>
</dd>
<dt><strong>-p</strong>, <strong>--indicator-style</strong>=<em>slash</em></dt>
<dd><p>append / indicator to directories</p>
</dd>
<dt><strong>-q</strong>, <strong>--hide-control-chars</strong></dt>
<dd><p>print ? instead of nongraphic characters</p>
</dd>
<dt><strong>--show-control-chars</strong></dt>
<dd><p>show nongraphic characters as-is (the default, unless program is 'ls' and output is a terminal)</p>
</dd>
<dt><strong>-Q</strong>, <strong>--quote-name</strong></dt>
<dd><p>enclose entry names in double quotes</p>
</dd>
<dt><strong>--quoting-style</strong>=<em>WORD</em></dt>
<dd><p>use quoting style WORD for entry names: literal, locale, shell, shell-always, shell-escape, shell-escape-always, c, escape (overrides QUOTING_STYLE environment variable)</p>
</dd>
<dt><strong>-r</strong>, <strong>--reverse</strong></dt>
<dd><p>reverse order while sorting</p>
</dd>
<dt><strong>-R</strong>, <strong>--recursive</strong></dt>
<dd><p>list subdirectories recursively</p>
</dd>
<dt><strong>-s</strong>, <strong>--size</strong></dt>
<dd><p>print the allocated size of each file, in blocks</p>
</dd>
<dt><strong>-S</strong></dt>
<dd><p>sort by file size, largest first</p>
</dd>
<dt><strong>--sort</strong>=<em>WORD</em></dt>
<dd><p>sort by WORD instead of name: none (<strong>-U</strong>), size (<strong>-S</strong>), time (<strong>-t</strong>), version (<strong>-v</strong>), extension (<strong>-X</strong>)</p>
</dd>
<dt><strong>--time</strong>=<em>WORD</em></dt>
<dd><p>with <strong>-l</strong>, show time as WORD instead of default modification time: atime or access or use (<strong>-u</strong>); ctime or status (<strong>-c</strong>); also use specified time as sort key if <strong>--sort</strong>=<em>time</em> (newest first)</p>
</dd>
<dt><strong>--time-style</strong>=<em>TIME_STYLE</em></dt>
<dd><p>time/date format with <strong>-l</strong>; see TIME_STYLE below</p>
</dd>
<dt><strong>-t</strong></dt>
<dd><p>sort by modification time, newest first</p>
</dd>
<dt><strong>-T</strong>, <strong>--tabsize</strong>=<em>COLS</em></dt>
<dd><p>assume tab stops at each COLS instead of 8</p>
</dd>
<dt><strong>-u</strong></dt>
<dd><p>with <strong>-lt</strong>: sort by, and show, access time; with <strong>-l</strong>: show access time and sort by name; otherwise: sort by access time, newest first</p>
</dd>
<dt><strong>-U</strong></dt>
<dd><p>do not sort; list entries in directory order</p>
</dd>
<dt><strong>-v</strong></dt>
<dd><p>natural sort of (version) numbers within text</p>
</dd>
<dt><strong>-w</strong>, <strong>--width</strong>=<em>COLS</em></dt>
<dd><p>set output width to COLS. 0 means no limit</p>
</dd>
<dt><strong>-x</strong></dt>
<dd><p>list entries by lines instead of by columns</p>
</dd>
<dt><strong>-X</strong></dt>
<dd><p>sort alphabetically by entry extension</p>
</dd>
<dt><strong>-Z</strong>, <strong>--context</strong></dt>
<dd><p>print any security context of each file</p>
</dd>
<dt><strong>-1</strong></dt>
<dd><p>list one file per line. Avoid '\n' with <strong>-q</strong> or <strong>-b</strong></p>
</dd>
<dt><strong>--help</strong></dt>
<dd><p>display this help and exit</p>
</dd>
<dt><strong>--version</strong></dt>
<dd><p>output version information and exit</p>
</dd>
</dl>
<p>The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000).</p>
<p>The TIME_STYLE argument can be full-iso, long-iso, iso, locale, or +FORMAT. FORMAT is interpreted like in date(1). If FORMAT is FORMAT1&lt;newline&gt;FORMAT2, then FORMAT1 applies to non-recent files and FORMAT2 to recent files. TIME_STYLE prefixed with 'posix-' takes effect only outside the POSIX locale. Also the TIME_STYLE environment variable sets the default style to use.</p>
<p>Using color to distinguish file types is disabled both by default and with <strong>--color</strong>=<em>never</em>. With <strong>--color</strong>=<em>auto</em>, ls emits color codes only when standard output is connected to a terminal. The LS_COLORS environment variable can change the settings. Use the dircolors command to set it.</p>
<h2>Exit status:</h2>
<dl>
<dt>0</dt>
<dd><p>if OK,</p>
</dd>
<dt>1</dt>
<dd><p>if minor problems (e.g., cannot access subdirectory),</p>
</dd>
<dt>2</dt>
<dd><p>if serious trouble (e.g., cannot access command-line argument).</p>
</dd>
</dl>
<h1>AUTHOR</h1>
<p>Written by Richard M. Stallman and David MacKenzie.</p>
<h1>REPORTING BUGS</h1>
<p>GNU coreutils online help: &lt;https://www.gnu.org/software/coreutils/&gt;<br />
Report ls translation bugs to &lt;https://translationproject.org/team/&gt;</p>
<h1>COPYRIGHT</h1>
<p>Copyright © 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later &lt;https://gnu.org/licenses/gpl.html&gt;.<br />
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.</p>
<h1>SEE ALSO</h1>
<p>Full documentation at: &lt;https://www.gnu.org/software/coreutils/ls&gt;<br />
or available locally via: info '(coreutils) ls invocation'</p>