version 3, including all changes.
.
Rev |
Author |
# |
Line |
3 |
IanMcDonald |
1 |
<verbatim> |
1 |
perry |
2 |
NAME |
3 |
IanMcDonald |
3 |
ls - list directory contents |
|
|
4 |
|
1 |
perry |
5 |
SYNOPSIS |
3 |
IanMcDonald |
6 |
ls [OPTION]... [FILE]... |
|
|
7 |
|
1 |
perry |
8 |
DESCRIPTION |
3 |
IanMcDonald |
9 |
List information about the FILEs (the current directory by default). |
|
|
10 |
Sort entries alphabetically if none of -cftuvSUX nor --sort. |
1 |
perry |
11 |
|
3 |
IanMcDonald |
12 |
Mandatory arguments to long options are mandatory for short options |
|
|
13 |
too. |
1 |
perry |
14 |
|
3 |
IanMcDonald |
15 |
-a, --all |
|
|
16 |
do not ignore entries starting with . |
1 |
perry |
17 |
|
3 |
IanMcDonald |
18 |
-A, --almost-all |
|
|
19 |
do not list implied . and .. |
1 |
perry |
20 |
|
3 |
IanMcDonald |
21 |
--author |
|
|
22 |
with -l, print the author of each file |
1 |
perry |
23 |
|
3 |
IanMcDonald |
24 |
-b, --escape |
|
|
25 |
print octal escapes for nongraphic characters |
1 |
perry |
26 |
|
3 |
IanMcDonald |
27 |
--block-size=SIZE |
|
|
28 |
use SIZE-byte blocks |
1 |
perry |
29 |
|
3 |
IanMcDonald |
30 |
-B, --ignore-backups |
|
|
31 |
do not list implied entries ending with ~ |
1 |
perry |
32 |
|
3 |
IanMcDonald |
33 |
-c with -lt: sort by, and show, ctime (time of last modification of |
|
|
34 |
file status information) with -l: show ctime and sort by name |
|
|
35 |
otherwise: sort by ctime |
1 |
perry |
36 |
|
3 |
IanMcDonald |
37 |
-C list entries by columns |
1 |
perry |
38 |
|
3 |
IanMcDonald |
39 |
--color[=WHEN] |
|
|
40 |
control whether color is used to distinguish file types. WHEN |
|
|
41 |
may be ‘never’, ‘always’, or ‘auto’ |
1 |
perry |
42 |
|
3 |
IanMcDonald |
43 |
-d, --directory |
|
|
44 |
list directory entries instead of contents, and do not derefer‐ |
|
|
45 |
ence symbolic links |
1 |
perry |
46 |
|
3 |
IanMcDonald |
47 |
-D, --dired |
|
|
48 |
generate output designed for Emacs’ dired mode |
1 |
perry |
49 |
|
3 |
IanMcDonald |
50 |
-f do not sort, enable -aU, disable -lst |
1 |
perry |
51 |
|
3 |
IanMcDonald |
52 |
-F, --classify |
|
|
53 |
append indicator (one of */=>@|) to entries |
1 |
perry |
54 |
|
3 |
IanMcDonald |
55 |
--file-type |
|
|
56 |
likewise, except do not append ‘*’ |
1 |
perry |
57 |
|
3 |
IanMcDonald |
58 |
--format=WORD |
|
|
59 |
across -x, commas -m, horizontal -x, long -l, single-column -1, |
|
|
60 |
verbose -l, vertical -C |
1 |
perry |
61 |
|
3 |
IanMcDonald |
62 |
--full-time |
|
|
63 |
like -l --time-style=full-iso |
1 |
perry |
64 |
|
3 |
IanMcDonald |
65 |
-g like -l, but do not list owner |
1 |
perry |
66 |
|
3 |
IanMcDonald |
67 |
-G, --no-group |
|
|
68 |
like -l, but do not list group |
1 |
perry |
69 |
|
3 |
IanMcDonald |
70 |
-h, --human-readable |
|
|
71 |
with -l, print sizes in human readable format (e.g., 1K 234M 2G) |
1 |
perry |
72 |
|
3 |
IanMcDonald |
73 |
--si likewise, but use powers of 1000 not 1024 |
1 |
perry |
74 |
|
3 |
IanMcDonald |
75 |
-H, --dereference-command-line |
|
|
76 |
follow symbolic links listed on the command line |
1 |
perry |
77 |
|
3 |
IanMcDonald |
78 |
--dereference-command-line-symlink-to-dir |
|
|
79 |
follow each command line symbolic link that points to a direc‐ |
|
|
80 |
tory |
1 |
perry |
81 |
|
3 |
IanMcDonald |
82 |
--hide=PATTERN |
|
|
83 |
do not list implied entries matching shell PATTERN (overridden |
|
|
84 |
by -a or -A) |
1 |
perry |
85 |
|
3 |
IanMcDonald |
86 |
--indicator-style=WORD append indicator with style WORD to entry names: |
|
|
87 |
none (default), slash (-p), file-type (--file-type), classify |
|
|
88 |
(-F) |
1 |
perry |
89 |
|
3 |
IanMcDonald |
90 |
-i, --inode |
|
|
91 |
with -l, print the index number of each file |
1 |
perry |
92 |
|
3 |
IanMcDonald |
93 |
-I, --ignore=PATTERN |
|
|
94 |
do not list implied entries matching shell PATTERN |
1 |
perry |
95 |
|
3 |
IanMcDonald |
96 |
-k like --block-size=1K |
1 |
perry |
97 |
|
3 |
IanMcDonald |
98 |
-l use a long listing format |
1 |
perry |
99 |
|
3 |
IanMcDonald |
100 |
-L, --dereference |
|
|
101 |
when showing file information for a symbolic link, show informa‐ |
|
|
102 |
tion for the file the link references rather than for the link |
|
|
103 |
itself |
1 |
perry |
104 |
|
3 |
IanMcDonald |
105 |
-m fill width with a comma separated list of entries |
1 |
perry |
106 |
|
3 |
IanMcDonald |
107 |
-n, --numeric-uid-gid |
|
|
108 |
like -l, but list numeric user and group IDs |
1 |
perry |
109 |
|
3 |
IanMcDonald |
110 |
-N, --literal |
|
|
111 |
print raw entry names (don’t treat e.g. control characters spe‐ |
|
|
112 |
cially) |
1 |
perry |
113 |
|
3 |
IanMcDonald |
114 |
-o like -l, but do not list group information |
1 |
perry |
115 |
|
3 |
IanMcDonald |
116 |
-p, --indicator-style=slash |
|
|
117 |
append / indicator to directories |
1 |
perry |
118 |
|
3 |
IanMcDonald |
119 |
-q, --hide-control-chars |
|
|
120 |
print ? instead of non graphic characters |
1 |
perry |
121 |
|
3 |
IanMcDonald |
122 |
--show-control-chars |
|
|
123 |
show non graphic characters as-is (default unless program is |
|
|
124 |
‘ls’ and output is a terminal) |
1 |
perry |
125 |
|
3 |
IanMcDonald |
126 |
-Q, --quote-name |
|
|
127 |
enclose entry names in double quotes |
1 |
perry |
128 |
|
3 |
IanMcDonald |
129 |
--quoting-style=WORD |
|
|
130 |
use quoting style WORD for entry names: literal, locale, shell, |
|
|
131 |
shell-always, c, escape |
1 |
perry |
132 |
|
3 |
IanMcDonald |
133 |
-r, --reverse |
|
|
134 |
reverse order while sorting |
1 |
perry |
135 |
|
3 |
IanMcDonald |
136 |
-R, --recursive |
|
|
137 |
list subdirectories recursively |
1 |
perry |
138 |
|
3 |
IanMcDonald |
139 |
-s, --size |
|
|
140 |
with -l, print size of each file, in blocks |
1 |
perry |
141 |
|
3 |
IanMcDonald |
142 |
-S sort by file size |
1 |
perry |
143 |
|
3 |
IanMcDonald |
144 |
--sort=WORD |
|
|
145 |
extension -X, none -U, size -S, time -t, version -v, status -c, |
|
|
146 |
time -t, atime -u, access -u, use -u |
1 |
perry |
147 |
|
3 |
IanMcDonald |
148 |
--time=WORD |
|
|
149 |
with -l, show time as WORD instead of modification time: atime, |
|
|
150 |
access, use, ctime or status; use specified time as sort key if |
|
|
151 |
--sort=time |
1 |
perry |
152 |
|
3 |
IanMcDonald |
153 |
--time-style=STYLE |
|
|
154 |
with -l, show times using style STYLE: full-iso, long-iso, iso, |
|
|
155 |
locale, +FORMAT. FORMAT is interpreted like ‘date’; if FORMAT |
|
|
156 |
is FORMAT1<newline>FORMAT2, FORMAT1 applies to non-recent files |
|
|
157 |
and FORMAT2 to recent files; if STYLE is prefixed with ‘posix-’, |
|
|
158 |
STYLE takes effect only outside the POSIX locale |
1 |
perry |
159 |
|
3 |
IanMcDonald |
160 |
-t sort by modification time |
1 |
perry |
161 |
|
3 |
IanMcDonald |
162 |
-T, --tabsize=COLS |
|
|
163 |
assume tab stops at each COLS instead of 8 |
1 |
perry |
164 |
|
3 |
IanMcDonald |
165 |
-u with -lt: sort by, and show, access time with -l: show access |
|
|
166 |
time and sort by name otherwise: sort by access time |
1 |
perry |
167 |
|
3 |
IanMcDonald |
168 |
-U do not sort; list entries in directory order |
1 |
perry |
169 |
|
3 |
IanMcDonald |
170 |
-v sort by version |
1 |
perry |
171 |
|
3 |
IanMcDonald |
172 |
-w, --width=COLS |
|
|
173 |
assume screen width instead of current value |
1 |
perry |
174 |
|
3 |
IanMcDonald |
175 |
-x list entries by lines instead of by columns |
1 |
perry |
176 |
|
3 |
IanMcDonald |
177 |
-X sort alphabetically by entry extension |
1 |
perry |
178 |
|
3 |
IanMcDonald |
179 |
-1 list one file per line |
1 |
perry |
180 |
|
3 |
IanMcDonald |
181 |
SELinux options: |
1 |
perry |
182 |
|
3 |
IanMcDonald |
183 |
--lcontext |
|
|
184 |
Display security context. Enable -l. Lines will probably be |
|
|
185 |
too wide for most displays. |
1 |
perry |
186 |
|
3 |
IanMcDonald |
187 |
-Z, --context |
|
|
188 |
Display security context so it fits on most displays. Displays |
|
|
189 |
only mode, user, group, security context and file name. |
1 |
perry |
190 |
|
3 |
IanMcDonald |
191 |
--scontext |
|
|
192 |
Display only security context and file name. |
1 |
perry |
193 |
|
3 |
IanMcDonald |
194 |
--help display this help and exit |
1 |
perry |
195 |
|
3 |
IanMcDonald |
196 |
--version |
|
|
197 |
output version information and exit |
1 |
perry |
198 |
|
3 |
IanMcDonald |
199 |
SIZE may be (or may be an integer optionally followed by) one of fol‐ |
|
|
200 |
lowing: kB 1000, K 1024, MB 1000*1000, M 1024*1024, and so on for G, T, |
|
|
201 |
P, E, Z, Y. |
1 |
perry |
202 |
|
3 |
IanMcDonald |
203 |
By default, color is not used to distinguish types of files. That is |
|
|
204 |
equivalent to using --color=none. Using the --color option without the |
|
|
205 |
optional WHEN argument is equivalent to using --color=always. With |
|
|
206 |
--color=auto, color codes are output only if standard output is con‐ |
|
|
207 |
nected to a terminal (tty). The environment variable LS_COLORS can |
|
|
208 |
influence the colors, and can be set easily by the dircolors command. |
1 |
perry |
209 |
|
3 |
IanMcDonald |
210 |
Exit status is 0 if OK, 1 if minor problems, 2 if serious trouble. |
1 |
perry |
211 |
|
3 |
IanMcDonald |
212 |
AUTHOR |
|
|
213 |
Written by Richard Stallman and David MacKenzie. |
1 |
perry |
214 |
|
3 |
IanMcDonald |
215 |
REPORTING BUGS |
|
|
216 |
Report bugs to <bug-coreutils@gnu.org>. |
1 |
perry |
217 |
|
3 |
IanMcDonald |
218 |
COPYRIGHT |
|
|
219 |
Copyright © 2006 Free Software Foundation, Inc. |
|
|
220 |
This is free software. You may redistribute copies of it under the |
|
|
221 |
terms of the GNU General Public License |
|
|
222 |
<http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the |
|
|
223 |
extent permitted by law. |
1 |
perry |
224 |
|
3 |
IanMcDonald |
225 |
SEE ALSO |
|
|
226 |
The full documentation for ls is maintained as a Texinfo manual. If |
|
|
227 |
the info and ls programs are properly installed at your site, the com‐ |
|
|
228 |
mand |
1 |
perry |
229 |
|
3 |
IanMcDonald |
230 |
info ls |
1 |
perry |
231 |
|
3 |
IanMcDonald |
232 |
should give you access to the complete manual. |
1 |
perry |
233 |
|
3 |
IanMcDonald |
234 |
</verbatim> |