Cleaned up ls directory
This commit is contained in:
parent
4bfaa48c5a
commit
b965ea014d
@ -1 +1 @@
|
|||||||
pandoc -V geometry:paperheight=8.5in,paperwidth=5.5in,left=1cm,right=1cm,top=1cm,bottom=2cm ls.1 -o ls-test4.pdf
|
pandoc -V geometry:paperheight=8.5in,paperwidth=5.5in,left=1cm,right=1cm,top=1cm,bottom=2cm ls.1 -o ls.pdf
|
||||||
|
BIN
ls/ls-test.pdf
BIN
ls/ls-test.pdf
Binary file not shown.
BIN
ls/ls-test2.pdf
BIN
ls/ls-test2.pdf
Binary file not shown.
BIN
ls/ls-test3.pdf
BIN
ls/ls-test3.pdf
Binary file not shown.
BIN
ls/ls-test4.pdf
BIN
ls/ls-test4.pdf
Binary file not shown.
BIN
ls/ls.1.gz
Normal file
BIN
ls/ls.1.gz
Normal file
Binary file not shown.
214
ls/ls.ps
214
ls/ls.ps
@ -1,214 +0,0 @@
|
|||||||
<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 */=>@|) 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<newline>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: <https://www.gnu.org/software/coreutils/><br />
|
|
||||||
Report ls translation bugs to <https://translationproject.org/team/></p>
|
|
||||||
<h1>COPYRIGHT</h1>
|
|
||||||
<p>Copyright © 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.<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: <https://www.gnu.org/software/coreutils/ls><br />
|
|
||||||
or available locally via: info '(coreutils) ls invocation'</p>
|
|
BIN
ls/lsa5.pdf
BIN
ls/lsa5.pdf
Binary file not shown.
111
ls/lsearch.3
111
ls/lsearch.3
@ -1,111 +0,0 @@
|
|||||||
.\" Copyright 1995 Jim Van Zandt <jrv@vanzandt.mv.com>
|
|
||||||
.\"
|
|
||||||
.\" %%%LICENSE_START(VERBATIM)
|
|
||||||
.\" Permission is granted to make and distribute verbatim copies of this
|
|
||||||
.\" manual provided the copyright notice and this permission notice are
|
|
||||||
.\" preserved on all copies.
|
|
||||||
.\"
|
|
||||||
.\" Permission is granted to copy and distribute modified versions of this
|
|
||||||
.\" manual under the conditions for verbatim copying, provided that the
|
|
||||||
.\" entire resulting derived work is distributed under the terms of a
|
|
||||||
.\" permission notice identical to this one.
|
|
||||||
.\"
|
|
||||||
.\" Since the Linux kernel and libraries are constantly changing, this
|
|
||||||
.\" manual page may be incorrect or out-of-date. The author(s) assume no
|
|
||||||
.\" responsibility for errors or omissions, or for damages resulting from
|
|
||||||
.\" the use of the information contained herein. The author(s) may not
|
|
||||||
.\" have taken the same level of care in the production of this manual,
|
|
||||||
.\" which is licensed free of charge, as they might when working
|
|
||||||
.\" professionally.
|
|
||||||
.\"
|
|
||||||
.\" Formatted or processed versions of this manual, if unaccompanied by
|
|
||||||
.\" the source, must acknowledge the copyright and authors of this work.
|
|
||||||
.\" %%%LICENSE_END
|
|
||||||
.\"
|
|
||||||
.\" Corrected prototype and include, aeb, 990927
|
|
||||||
.TH LSEARCH 3 2017-09-15 "GNU" "Linux Programmer's Manual"
|
|
||||||
.SH NAME
|
|
||||||
lfind, lsearch \- linear search of an array
|
|
||||||
.SH SYNOPSIS
|
|
||||||
.nf
|
|
||||||
.B #include <search.h>
|
|
||||||
.PP
|
|
||||||
.BI "void *lfind(const void *" key ", const void *" base ", size_t *" nmemb ,
|
|
||||||
.BI " size_t " size ", int(*" compar ")(const void *, const void *));"
|
|
||||||
.PP
|
|
||||||
.BI "void *lsearch(const void *" key ", void *" base ", size_t *" nmemb ,
|
|
||||||
.BI " size_t " size ", int(*" compar ")(const void *, const void *));"
|
|
||||||
.fi
|
|
||||||
.SH DESCRIPTION
|
|
||||||
.BR lfind ()
|
|
||||||
and
|
|
||||||
.BR lsearch ()
|
|
||||||
perform a linear search for
|
|
||||||
.I key
|
|
||||||
in the array
|
|
||||||
.IR base
|
|
||||||
which has
|
|
||||||
.I *nmemb
|
|
||||||
elements of
|
|
||||||
.I size
|
|
||||||
bytes each.
|
|
||||||
The comparison function referenced by
|
|
||||||
.I compar
|
|
||||||
is expected to have two arguments which point to the
|
|
||||||
.I key
|
|
||||||
object and to an array member, in that order, and which
|
|
||||||
returns zero if the
|
|
||||||
.I key
|
|
||||||
object matches the array member, and
|
|
||||||
nonzero otherwise.
|
|
||||||
.PP
|
|
||||||
If
|
|
||||||
.BR lsearch ()
|
|
||||||
does not find a matching element, then the
|
|
||||||
.I key
|
|
||||||
object is inserted at the end of the table, and
|
|
||||||
.I *nmemb
|
|
||||||
is
|
|
||||||
incremented.
|
|
||||||
In particular, one should know that a matching element
|
|
||||||
exists, or that more room is available.
|
|
||||||
.SH RETURN VALUE
|
|
||||||
.BR lfind ()
|
|
||||||
returns a pointer to a matching member of the array, or
|
|
||||||
NULL if no match is found.
|
|
||||||
.BR lsearch ()
|
|
||||||
returns a pointer to
|
|
||||||
a matching member of the array, or to the newly added member if no
|
|
||||||
match is found.
|
|
||||||
.SH ATTRIBUTES
|
|
||||||
For an explanation of the terms used in this section, see
|
|
||||||
.BR attributes (7).
|
|
||||||
.TS
|
|
||||||
allbox;
|
|
||||||
lbw18 lb lb
|
|
||||||
l l l.
|
|
||||||
Interface Attribute Value
|
|
||||||
T{
|
|
||||||
.BR lfind (),
|
|
||||||
.BR lsearch ()
|
|
||||||
T} Thread safety MT-Safe
|
|
||||||
.TE
|
|
||||||
.sp 1
|
|
||||||
.SH CONFORMING TO
|
|
||||||
POSIX.1-2001, POSIX.1-2008, SVr4, 4.3BSD.
|
|
||||||
Present in libc since libc-4.6.27.
|
|
||||||
.SH BUGS
|
|
||||||
The naming is unfortunate.
|
|
||||||
.SH SEE ALSO
|
|
||||||
.BR bsearch (3),
|
|
||||||
.BR hsearch (3),
|
|
||||||
.BR tsearch (3)
|
|
||||||
.SH COLOPHON
|
|
||||||
This page is part of release 5.05 of the Linux
|
|
||||||
.I man-pages
|
|
||||||
project.
|
|
||||||
A description of the project,
|
|
||||||
information about reporting bugs,
|
|
||||||
and the latest version of this page,
|
|
||||||
can be found at
|
|
||||||
\%https://www.kernel.org/doc/man\-pages/.
|
|
Loading…
Reference in New Issue
Block a user