manbook 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/Gemfile +15 -0
- data/Gemfile.lock +25 -0
- data/LICENSE.txt +20 -0
- data/README.md +105 -0
- data/Rakefile +46 -0
- data/TODO +2 -0
- data/VERSION +1 -0
- data/bin/manbook +89 -0
- data/bin/mktoc +157 -0
- data/lib/manbook.rb +30 -0
- data/lib/manbook/errors.rb +22 -0
- data/lib/manbook/formatter.rb +27 -0
- data/lib/manbook/html_formatter.rb +17 -0
- data/lib/manbook/log_formatter.rb +9 -0
- data/lib/manbook/parser.rb +32 -0
- data/templates/_page.html.erb +1 -0
- data/templates/about.html.erb +6 -0
- data/templates/application.html.erb +23 -0
- data/templates/index.html.erb +4 -0
- data/templates/library_books.jpg +0 -0
- data/templates/manbook.ncx.erb +28 -0
- data/templates/manbook.opf.erb +35 -0
- data/test/fixtures/bash.html +11352 -0
- data/test/fixtures/cat.html +195 -0
- data/test/fixtures/git.html +1882 -0
- data/test/fixtures/gunzip.html +595 -0
- data/test/fixtures/less.html +3554 -0
- data/test/fixtures/ls.html +818 -0
- data/test/fixtures/man.html +649 -0
- data/test/helper.rb +42 -0
- data/test/unit/test_manbook.rb +39 -0
- data/test/unit/test_mktoc.rb +215 -0
- metadata +189 -0
@@ -0,0 +1,818 @@
|
|
1
|
+
<!-- Creator : groff version 1.19.2 -->
|
2
|
+
<!-- CreationDate: Tue Nov 29 21:01:35 2011 -->
|
3
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/html4/loose.dtd">
|
5
|
+
<html>
|
6
|
+
<head>
|
7
|
+
<meta name="generator" content="groff -Thtml, see www.gnu.org">
|
8
|
+
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
|
9
|
+
<meta name="Content-Style" content="text/css">
|
10
|
+
<style type="text/css">
|
11
|
+
p { margin-top: 0; margin-bottom: 0; }
|
12
|
+
pre { margin-top: 0; margin-bottom: 0; }
|
13
|
+
table { margin-top: 0; margin-bottom: 0; }
|
14
|
+
</style>
|
15
|
+
<title></title>
|
16
|
+
</head>
|
17
|
+
<body>
|
18
|
+
|
19
|
+
<hr>
|
20
|
+
|
21
|
+
|
22
|
+
<p valign="top">LS(1) BSD General Commands Manual LS(1)</p>
|
23
|
+
|
24
|
+
<p style="margin-top: 1em" valign="top"><b>NAME</b></p>
|
25
|
+
|
26
|
+
<p style="margin-left:8%;"><b>ls</b> — list directory
|
27
|
+
contents</p>
|
28
|
+
|
29
|
+
|
30
|
+
<p style="margin-top: 1em" valign="top"><b>SYNOPSIS</b></p>
|
31
|
+
|
32
|
+
<p style="margin-left:12%;"><b>ls</b>
|
33
|
+
[<b>−ABCFGHLOPRSTUW@abcdefghiklmnopqrstuwx1</b>]
|
34
|
+
[<i>file ...</i>]</p>
|
35
|
+
|
36
|
+
|
37
|
+
<p style="margin-top: 1em" valign="top"><b>DESCRIPTION</b></p>
|
38
|
+
|
39
|
+
<p style="margin-left:8%;">For each operand that names a
|
40
|
+
<i>file</i> of a type other than directory, <b>ls</b>
|
41
|
+
displays its name as well as any requested, associated
|
42
|
+
information. For each operand that names a <i>file</i> of
|
43
|
+
type directory, <b>ls</b> displays the names of files
|
44
|
+
contained within that directory, as well as any requested,
|
45
|
+
associated information.</p>
|
46
|
+
|
47
|
+
<p style="margin-left:8%; margin-top: 1em">If no operands
|
48
|
+
are given, the contents of the current directory are
|
49
|
+
displayed. If more than one operand is given, non-directory
|
50
|
+
operands are displayed first; directory and non-directory
|
51
|
+
operands are sorted separately and in lexicographical
|
52
|
+
order.</p>
|
53
|
+
|
54
|
+
<p style="margin-left:8%; margin-top: 1em">The following
|
55
|
+
options are available:</p>
|
56
|
+
|
57
|
+
|
58
|
+
<p style="margin-top: 1em" valign="top"><b>−@</b></p>
|
59
|
+
|
60
|
+
<p style="margin-left:20%; margin-top: 1em">Display
|
61
|
+
extended attribute keys and sizes in long (<b>−l</b>)
|
62
|
+
output.</p>
|
63
|
+
|
64
|
+
|
65
|
+
<p style="margin-top: 1em" valign="top"><b>−1</b></p>
|
66
|
+
|
67
|
+
<p style="margin-left:20%; margin-top: 1em">(The numeric
|
68
|
+
digit ‘‘one’’.) Force output to be
|
69
|
+
one entry per line. This is the default when output is not
|
70
|
+
to a terminal.</p>
|
71
|
+
|
72
|
+
|
73
|
+
<p style="margin-top: 1em" valign="top"><b>−A</b></p>
|
74
|
+
|
75
|
+
<p style="margin-left:20%; margin-top: 1em">List all
|
76
|
+
entries except for <i>.</i> and <i>..</i>. Always set for
|
77
|
+
the super-user.</p>
|
78
|
+
|
79
|
+
|
80
|
+
<p style="margin-top: 1em" valign="top"><b>−a</b></p>
|
81
|
+
|
82
|
+
<p style="margin-left:20%; margin-top: 1em">Include
|
83
|
+
directory entries whose names begin with a dot
|
84
|
+
(<i>.</i>).</p>
|
85
|
+
|
86
|
+
|
87
|
+
<p style="margin-top: 1em" valign="top"><b>−B</b></p>
|
88
|
+
|
89
|
+
<p style="margin-left:20%; margin-top: 1em">Force printing
|
90
|
+
of non-printable characters (as defined by ctype(3) and
|
91
|
+
current locale settings) in file names as \<i>xxx</i>, where
|
92
|
+
<i>xxx</i> is the numeric value of the character in
|
93
|
+
octal.</p>
|
94
|
+
|
95
|
+
|
96
|
+
<p style="margin-top: 1em" valign="top"><b>−b</b></p>
|
97
|
+
|
98
|
+
<p style="margin-left:20%; margin-top: 1em">As
|
99
|
+
<b>−B</b>, but use C escape codes whenever
|
100
|
+
possible.</p>
|
101
|
+
|
102
|
+
|
103
|
+
<p style="margin-top: 1em" valign="top"><b>−C</b></p>
|
104
|
+
|
105
|
+
<p style="margin-left:20%; margin-top: 1em">Force
|
106
|
+
multi-column output; this is the default when output is to a
|
107
|
+
terminal.</p>
|
108
|
+
|
109
|
+
|
110
|
+
<p style="margin-top: 1em" valign="top"><b>−c</b></p>
|
111
|
+
|
112
|
+
<p style="margin-left:20%; margin-top: 1em">Use time when
|
113
|
+
file status was last changed for sorting (<b>−t</b>)
|
114
|
+
or long printing (<b>−l</b>).</p>
|
115
|
+
|
116
|
+
|
117
|
+
<p style="margin-top: 1em" valign="top"><b>−d</b></p>
|
118
|
+
|
119
|
+
<p style="margin-left:20%; margin-top: 1em">Directories are
|
120
|
+
listed as plain files (not searched recursively).</p>
|
121
|
+
|
122
|
+
|
123
|
+
<p style="margin-top: 1em" valign="top"><b>−e</b></p>
|
124
|
+
|
125
|
+
<p style="margin-left:20%; margin-top: 1em">Print the
|
126
|
+
Access Control List (ACL) associated with the file, if
|
127
|
+
present, in long (<b>−l</b>) output.</p>
|
128
|
+
|
129
|
+
|
130
|
+
<p style="margin-top: 1em" valign="top"><b>−F</b></p>
|
131
|
+
|
132
|
+
<p style="margin-left:20%; margin-top: 1em">Display a slash
|
133
|
+
(‘/’) immediately after each pathname that is a
|
134
|
+
directory, an asterisk (‘*’) after each that is
|
135
|
+
executable, an at sign (‘@’) after each symbolic
|
136
|
+
link, an equals sign (‘=’) after each socket, a
|
137
|
+
percent sign (‘%’) after each whiteout, and a
|
138
|
+
vertical bar (‘|’) after each that is a
|
139
|
+
FIFO.</p>
|
140
|
+
|
141
|
+
|
142
|
+
<p style="margin-top: 1em" valign="top"><b>−f</b></p>
|
143
|
+
|
144
|
+
<p style="margin-left:20%; margin-top: 1em">Output is not
|
145
|
+
sorted. This option turns on the <b>−a</b> option.</p>
|
146
|
+
|
147
|
+
|
148
|
+
<p style="margin-top: 1em" valign="top"><b>−G</b></p>
|
149
|
+
|
150
|
+
<p style="margin-left:20%; margin-top: 1em">Enable
|
151
|
+
colorized output. This option is equivalent to defining
|
152
|
+
CLICOLOR in the environment. (See below.)</p>
|
153
|
+
|
154
|
+
|
155
|
+
<p style="margin-top: 1em" valign="top"><b>−g</b></p>
|
156
|
+
|
157
|
+
<p style="margin-left:20%; margin-top: 1em">This option is
|
158
|
+
only available for compatibility with POSIX; it is used to
|
159
|
+
display the group name in the long (<b>−l</b>) format
|
160
|
+
output (the owner name is suppressed).</p>
|
161
|
+
|
162
|
+
|
163
|
+
<p style="margin-top: 1em" valign="top"><b>−H</b></p>
|
164
|
+
|
165
|
+
<p style="margin-left:20%; margin-top: 1em">Symbolic links
|
166
|
+
on the command line are followed. This option is assumed if
|
167
|
+
none of the <b>−F</b>, <b>−d</b>, or
|
168
|
+
<b>−l</b> options are specified.</p>
|
169
|
+
|
170
|
+
|
171
|
+
<p style="margin-top: 1em" valign="top"><b>−h</b></p>
|
172
|
+
|
173
|
+
<p style="margin-left:20%; margin-top: 1em">When used with
|
174
|
+
the <b>−l</b> option, use unit suffixes: Byte,
|
175
|
+
Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte in order
|
176
|
+
to reduce the number of digits to three or less using base 2
|
177
|
+
for sizes.</p>
|
178
|
+
|
179
|
+
|
180
|
+
<p style="margin-top: 1em" valign="top"><b>−i</b></p>
|
181
|
+
|
182
|
+
<p style="margin-left:20%; margin-top: 1em">For each file,
|
183
|
+
print the file’s file serial number (inode
|
184
|
+
number).</p>
|
185
|
+
|
186
|
+
|
187
|
+
<p style="margin-top: 1em" valign="top"><b>−k</b></p>
|
188
|
+
|
189
|
+
<p style="margin-left:20%; margin-top: 1em">If the
|
190
|
+
<b>−s</b> option is specified, print the file size
|
191
|
+
allocation in kilobytes, not blocks. This option overrides
|
192
|
+
the environment variable BLOCKSIZE.</p>
|
193
|
+
|
194
|
+
|
195
|
+
<p style="margin-top: 1em" valign="top"><b>−L</b></p>
|
196
|
+
|
197
|
+
<p style="margin-left:20%; margin-top: 1em">Follow all
|
198
|
+
symbolic links to final target and list the file or
|
199
|
+
directory the link references rather than the link itself.
|
200
|
+
This option cancels the <b>−P</b> option.</p>
|
201
|
+
|
202
|
+
|
203
|
+
<p style="margin-top: 1em" valign="top"><b>−l</b></p>
|
204
|
+
|
205
|
+
<p style="margin-left:20%; margin-top: 1em">(The lowercase
|
206
|
+
letter ‘‘ell’’.) List in long
|
207
|
+
format. (See below.) If the output is to a terminal, a total
|
208
|
+
sum for all the file sizes is output on a line before the
|
209
|
+
long listing.</p>
|
210
|
+
|
211
|
+
|
212
|
+
<p style="margin-top: 1em" valign="top"><b>−m</b></p>
|
213
|
+
|
214
|
+
<p style="margin-left:20%; margin-top: 1em">Stream output
|
215
|
+
format; list files across the page, separated by commas.</p>
|
216
|
+
|
217
|
+
|
218
|
+
<p style="margin-top: 1em" valign="top"><b>−n</b></p>
|
219
|
+
|
220
|
+
<p style="margin-left:20%; margin-top: 1em">Display user
|
221
|
+
and group IDs numerically, rather than converting to a user
|
222
|
+
or group name in a long (<b>−l</b>) output. This
|
223
|
+
option turns on the <b>−l</b> option.</p>
|
224
|
+
|
225
|
+
|
226
|
+
<p style="margin-top: 1em" valign="top"><b>−O</b></p>
|
227
|
+
|
228
|
+
<p style="margin-left:20%; margin-top: 1em">Include the
|
229
|
+
file flags in a long (<b>−l</b>) output.</p>
|
230
|
+
|
231
|
+
|
232
|
+
<p style="margin-top: 1em" valign="top"><b>−o</b></p>
|
233
|
+
|
234
|
+
<p style="margin-left:20%; margin-top: 1em">List in long
|
235
|
+
format, but omit the group id.</p>
|
236
|
+
|
237
|
+
|
238
|
+
<p style="margin-top: 1em" valign="top"><b>−P</b></p>
|
239
|
+
|
240
|
+
<p style="margin-left:20%; margin-top: 1em">If argument is
|
241
|
+
a symbolic link, list the link itself rather than the object
|
242
|
+
the link references. This option cancels the <b>−H</b>
|
243
|
+
and <b>−L</b> options.</p>
|
244
|
+
|
245
|
+
|
246
|
+
<p style="margin-top: 1em" valign="top"><b>−p</b></p>
|
247
|
+
|
248
|
+
<p style="margin-left:20%; margin-top: 1em">Write a slash
|
249
|
+
(‘/’) after each filename if that file is a
|
250
|
+
directory.</p>
|
251
|
+
|
252
|
+
|
253
|
+
<p style="margin-top: 1em" valign="top"><b>−q</b></p>
|
254
|
+
|
255
|
+
<p style="margin-left:20%; margin-top: 1em">Force printing
|
256
|
+
of non-graphic characters in file names as the character
|
257
|
+
‘?’; this is the default when output is to a
|
258
|
+
terminal.</p>
|
259
|
+
|
260
|
+
|
261
|
+
<p style="margin-top: 1em" valign="top"><b>−R</b></p>
|
262
|
+
|
263
|
+
<p style="margin-left:20%; margin-top: 1em">Recursively
|
264
|
+
list subdirectories encountered.</p>
|
265
|
+
|
266
|
+
|
267
|
+
<p style="margin-top: 1em" valign="top"><b>−r</b></p>
|
268
|
+
|
269
|
+
<p style="margin-left:20%; margin-top: 1em">Reverse the
|
270
|
+
order of the sort to get reverse lexicographical order or
|
271
|
+
the oldest entries first (or largest files last, if combined
|
272
|
+
with sort by size</p>
|
273
|
+
|
274
|
+
|
275
|
+
<p style="margin-top: 1em" valign="top"><b>−S</b></p>
|
276
|
+
|
277
|
+
<p style="margin-left:20%; margin-top: 1em">Sort files by
|
278
|
+
size</p>
|
279
|
+
|
280
|
+
|
281
|
+
<p style="margin-top: 1em" valign="top"><b>−s</b></p>
|
282
|
+
|
283
|
+
<p style="margin-left:20%; margin-top: 1em">Display the
|
284
|
+
number of file system blocks actually used by each file, in
|
285
|
+
units of 512 bytes, where partial units are rounded up to
|
286
|
+
the next integer value. If the output is to a terminal, a
|
287
|
+
total sum for all the file sizes is output on a line before
|
288
|
+
the listing. The environment variable BLOCKSIZE overrides
|
289
|
+
the unit size of 512 bytes.</p>
|
290
|
+
|
291
|
+
|
292
|
+
<p style="margin-top: 1em" valign="top"><b>−T</b></p>
|
293
|
+
|
294
|
+
<p style="margin-left:20%; margin-top: 1em">When used with
|
295
|
+
the <b>−l</b> (lowercase letter
|
296
|
+
‘‘ell’’) option, display complete
|
297
|
+
time information for the file, including month, day, hour,
|
298
|
+
minute, second, and year.</p>
|
299
|
+
|
300
|
+
|
301
|
+
<p style="margin-top: 1em" valign="top"><b>−t</b></p>
|
302
|
+
|
303
|
+
<p style="margin-left:20%; margin-top: 1em">Sort by time
|
304
|
+
modified (most recently modified first) before sorting the
|
305
|
+
operands by lexicographical order.</p>
|
306
|
+
|
307
|
+
|
308
|
+
<p style="margin-top: 1em" valign="top"><b>−u</b></p>
|
309
|
+
|
310
|
+
<p style="margin-left:20%; margin-top: 1em">Use time of
|
311
|
+
last access, instead of last modification of the file for
|
312
|
+
sorting (<b>−t</b>) or long printing
|
313
|
+
(<b>−l</b>).</p>
|
314
|
+
|
315
|
+
|
316
|
+
<p style="margin-top: 1em" valign="top"><b>−U</b></p>
|
317
|
+
|
318
|
+
<p style="margin-left:20%; margin-top: 1em">Use time of
|
319
|
+
file creation, instead of last modification for sorting
|
320
|
+
(<b>−t</b>) or long output (<b>−l</b>).</p>
|
321
|
+
|
322
|
+
|
323
|
+
<p style="margin-top: 1em" valign="top"><b>−v</b></p>
|
324
|
+
|
325
|
+
<p style="margin-left:20%; margin-top: 1em">Force unedited
|
326
|
+
printing of non-graphic characters; this is the default when
|
327
|
+
output is not to a terminal.</p>
|
328
|
+
|
329
|
+
|
330
|
+
<p style="margin-top: 1em" valign="top"><b>−W</b></p>
|
331
|
+
|
332
|
+
<p style="margin-left:20%; margin-top: 1em">Display
|
333
|
+
whiteouts when scanning directories. (<b>−S</b>)
|
334
|
+
flag).</p>
|
335
|
+
|
336
|
+
|
337
|
+
<p style="margin-top: 1em" valign="top"><b>−w</b></p>
|
338
|
+
|
339
|
+
<p style="margin-left:20%; margin-top: 1em">Force raw
|
340
|
+
printing of non-printable characters. This is the default
|
341
|
+
when output is not to a terminal.</p>
|
342
|
+
|
343
|
+
|
344
|
+
<p style="margin-top: 1em" valign="top"><b>−x</b></p>
|
345
|
+
|
346
|
+
<p style="margin-left:20%; margin-top: 1em">The same as
|
347
|
+
<b>−C</b>, except that the multi-column output is
|
348
|
+
produced with entries sorted across, rather than down, the
|
349
|
+
columns.</p>
|
350
|
+
|
351
|
+
<p style="margin-left:8%; margin-top: 1em">The
|
352
|
+
<b>−1</b>, <b>−C</b>, <b>−x</b>, and
|
353
|
+
<b>−l</b> options all override each other; the last
|
354
|
+
one specified determines the format used.</p>
|
355
|
+
|
356
|
+
<p style="margin-left:8%; margin-top: 1em">The
|
357
|
+
<b>−c</b> and <b>−u</b> options override each
|
358
|
+
other; the last one specified determines the file time
|
359
|
+
used.</p>
|
360
|
+
|
361
|
+
<p style="margin-left:8%; margin-top: 1em">The
|
362
|
+
<b>−B</b>, <b>−b</b>, <b>−w</b>, and
|
363
|
+
<b>−q</b> options all override each other; the last
|
364
|
+
one specified determines the format used for non-printable
|
365
|
+
characters.</p>
|
366
|
+
|
367
|
+
<p style="margin-left:8%; margin-top: 1em">The
|
368
|
+
<b>−H</b>, <b>−L</b> and <b>−P</b> options
|
369
|
+
all override each other (either partially or fully); they
|
370
|
+
are applied in the order specified.</p>
|
371
|
+
|
372
|
+
<p style="margin-left:8%; margin-top: 1em">By default,
|
373
|
+
<b>ls</b> lists one entry per line to standard output; the
|
374
|
+
exceptions are to terminals or when the <b>−C</b> or
|
375
|
+
<b>−x</b> options are specified.</p>
|
376
|
+
|
377
|
+
<p style="margin-left:8%; margin-top: 1em">File information
|
378
|
+
is displayed with one or more ⟨</p>
|
379
|
+
|
380
|
+
<p valign="top">blank ⟩s separating the information
|
381
|
+
associated with the <b>−i</b>, <b>−s</b>, and
|
382
|
+
<b>−l</b> options.</p>
|
383
|
+
|
384
|
+
<p style="margin-left:8%; margin-top: 1em"><b>The Long
|
385
|
+
Format</b> <br>
|
386
|
+
If the <b>−l</b> option is given, the following
|
387
|
+
information is displayed for each file: file mode, number of
|
388
|
+
links, owner name, group name, number of bytes in the file,
|
389
|
+
abbreviated month, day-of-month file was last modified, hour
|
390
|
+
file last modified, minute file last modified, and the
|
391
|
+
pathname. In addition, for each directory whose contents are
|
392
|
+
displayed, the total number of 512-byte blocks used by the
|
393
|
+
files in the directory is displayed on a line by itself,
|
394
|
+
immediately before the information for the files in the
|
395
|
+
directory. If the file or directory has extended attributes,
|
396
|
+
the permissions field printed by the <b>−l</b> option
|
397
|
+
is followed by a ’@’ character. Otherwise, if
|
398
|
+
the file or directory has extended security information
|
399
|
+
(such as an access control list), the permissions field
|
400
|
+
printed by the <b>−l</b> option is followed by a
|
401
|
+
’+’ character.</p>
|
402
|
+
|
403
|
+
<p style="margin-left:8%; margin-top: 1em">If the
|
404
|
+
modification time of the file is more than 6 months in the
|
405
|
+
past or future, then the year of the last modification is
|
406
|
+
displayed in place of the hour and minute fields.</p>
|
407
|
+
|
408
|
+
<p style="margin-left:8%; margin-top: 1em">If the owner or
|
409
|
+
group names are not a known user or group name, or the
|
410
|
+
<b>−n</b> option is given, the numeric ID’s are
|
411
|
+
displayed.</p>
|
412
|
+
|
413
|
+
<p style="margin-left:8%; margin-top: 1em">If the file is a
|
414
|
+
character special or block special file, the major and minor
|
415
|
+
device numbers for the file are displayed in the size field.
|
416
|
+
If the file is a symbolic link, the pathname of the
|
417
|
+
linked-to file is preceded by
|
418
|
+
‘‘->’’.</p>
|
419
|
+
|
420
|
+
<p style="margin-left:8%; margin-top: 1em">The file mode
|
421
|
+
printed under the <b>−l</b> option consists of the
|
422
|
+
entry type, owner permissions, and group permissions. The
|
423
|
+
entry type character describes the type of file, as
|
424
|
+
follows:</p>
|
425
|
+
|
426
|
+
<p style="margin-top: 1em" valign="top"><b>b</b></p>
|
427
|
+
|
428
|
+
<p style="margin-left:26%; margin-top: 1em">Block special
|
429
|
+
file.</p>
|
430
|
+
|
431
|
+
<p valign="top"><b>c</b></p>
|
432
|
+
|
433
|
+
<p style="margin-left:26%; margin-top: 1em">Character
|
434
|
+
special file.</p>
|
435
|
+
|
436
|
+
<p valign="top"><b>d</b></p>
|
437
|
+
|
438
|
+
<p style="margin-left:26%; margin-top: 1em">Directory.</p>
|
439
|
+
|
440
|
+
<p valign="top"><b>l</b></p>
|
441
|
+
|
442
|
+
<p style="margin-left:26%; margin-top: 1em">Symbolic
|
443
|
+
link.</p>
|
444
|
+
|
445
|
+
<p valign="top"><b>s</b></p>
|
446
|
+
|
447
|
+
<p style="margin-left:26%; margin-top: 1em">Socket
|
448
|
+
link.</p>
|
449
|
+
|
450
|
+
<p valign="top"><b>p</b></p>
|
451
|
+
|
452
|
+
<p style="margin-left:26%; margin-top: 1em">FIFO.</p>
|
453
|
+
|
454
|
+
<p valign="top"><b>−</b></p>
|
455
|
+
|
456
|
+
<p style="margin-left:26%; margin-top: 1em">Regular
|
457
|
+
file.</p>
|
458
|
+
|
459
|
+
<p style="margin-left:8%; margin-top: 1em">The next three
|
460
|
+
fields are three characters each: owner permissions, group
|
461
|
+
permissions, and other permissions. Each field has three
|
462
|
+
character positions:</p>
|
463
|
+
|
464
|
+
<p style="margin-top: 1em" valign="top">1.</p>
|
465
|
+
|
466
|
+
<p style="margin-left:25%;">If <b>r</b>, the file is
|
467
|
+
readable; if <b>−</b>, it is not readable.</p>
|
468
|
+
|
469
|
+
<p style="margin-top: 1em" valign="top">2.</p>
|
470
|
+
|
471
|
+
<p style="margin-left:25%;">If <b>w</b>, the file is
|
472
|
+
writable; if <b>−</b>, it is not writable.</p>
|
473
|
+
|
474
|
+
<p style="margin-top: 1em" valign="top">3.</p>
|
475
|
+
|
476
|
+
<p style="margin-left:25%;">The first of the following that
|
477
|
+
applies:</p>
|
478
|
+
|
479
|
+
<p style="margin-top: 1em" valign="top"><b>S</b></p>
|
480
|
+
|
481
|
+
<p style="margin-left:43%; margin-top: 1em">If in the owner
|
482
|
+
permissions, the file is not executable and set-user-ID mode
|
483
|
+
is set. If in the group permissions, the file is not
|
484
|
+
executable and set-group-ID mode is set.</p>
|
485
|
+
|
486
|
+
<p style="margin-top: 1em" valign="top"><b>s</b></p>
|
487
|
+
|
488
|
+
<p style="margin-left:43%; margin-top: 1em">If in the owner
|
489
|
+
permissions, the file is executable and set-user-ID mode is
|
490
|
+
set. If in the group permissions, the file is executable and
|
491
|
+
setgroup-ID mode is set.</p>
|
492
|
+
|
493
|
+
<p style="margin-top: 1em" valign="top"><b>x</b></p>
|
494
|
+
|
495
|
+
<p style="margin-left:43%; margin-top: 1em">The file is
|
496
|
+
executable or the directory is searchable.</p>
|
497
|
+
|
498
|
+
<p style="margin-top: 1em" valign="top"><b>−</b></p>
|
499
|
+
|
500
|
+
<p style="margin-left:43%; margin-top: 1em">The file is
|
501
|
+
neither readable, writable, executable, nor set-user-ID nor
|
502
|
+
set-group-ID mode, nor sticky. (See below.)</p>
|
503
|
+
|
504
|
+
<p style="margin-left:25%; margin-top: 1em">These next two
|
505
|
+
apply only to the third character in the last group (other
|
506
|
+
permissions).</p>
|
507
|
+
|
508
|
+
<p style="margin-top: 1em" valign="top"><b>T</b></p>
|
509
|
+
|
510
|
+
<p style="margin-left:43%; margin-top: 1em">The sticky bit
|
511
|
+
is set (mode 1000), but not execute or search permission.
|
512
|
+
(See chmod(1) or sticky(8).)</p>
|
513
|
+
|
514
|
+
<p style="margin-top: 1em" valign="top"><b>t</b></p>
|
515
|
+
|
516
|
+
<p style="margin-left:43%; margin-top: 1em">The sticky bit
|
517
|
+
is set (mode 1000), and is searchable or executable. (See
|
518
|
+
chmod(1) or sticky(8).)</p>
|
519
|
+
|
520
|
+
|
521
|
+
<p style="margin-top: 1em" valign="top"><b>EXAMPLES</b></p>
|
522
|
+
|
523
|
+
<p style="margin-left:8%;">The following is how to do an
|
524
|
+
<b>ls</b> listing sorted by increasing size</p>
|
525
|
+
|
526
|
+
<p style="margin-left:17%; margin-top: 1em">ls -lrS</p>
|
527
|
+
|
528
|
+
|
529
|
+
<p style="margin-top: 1em" valign="top"><b>DIAGNOSTICS</b></p>
|
530
|
+
|
531
|
+
<p style="margin-left:8%;">The <b>ls</b> utility
|
532
|
+
exits 0 on success, and >0 if an error
|
533
|
+
occurs.</p>
|
534
|
+
|
535
|
+
|
536
|
+
<p style="margin-top: 1em" valign="top"><b>ENVIRONMENT</b></p>
|
537
|
+
|
538
|
+
<p style="margin-left:8%;">The following environment
|
539
|
+
variables affect the execution of <b>ls</b>:</p>
|
540
|
+
|
541
|
+
<p style="margin-top: 1em" valign="top">BLOCKSIZE</p>
|
542
|
+
|
543
|
+
<p style="margin-left:32%; margin-top: 1em">If the
|
544
|
+
environment variable BLOCKSIZE is set, the block counts (see
|
545
|
+
<b>−s</b>) will be displayed in units of that size
|
546
|
+
block.</p>
|
547
|
+
|
548
|
+
<p style="margin-top: 1em" valign="top">CLICOLOR</p>
|
549
|
+
|
550
|
+
<p style="margin-left:32%; margin-top: 1em">Use ANSI color
|
551
|
+
sequences to distinguish file types. See LSCOLORS below. In
|
552
|
+
addition to the file types mentioned in the <b>−F</b>
|
553
|
+
option some extra attributes (setuid bit set, etc.) are also
|
554
|
+
displayed. The colorization is dependent on a terminal type
|
555
|
+
with the proper termcap(5) capabilities. The default
|
556
|
+
‘‘cons25’’ console has the proper
|
557
|
+
capabilities, but to display the colors in an xterm(1), for
|
558
|
+
example, the TERM variable must be set to
|
559
|
+
‘‘xterm-color’’. Other terminal
|
560
|
+
types may require similar adjustments. Colorization is
|
561
|
+
silently disabled if the output isn’t directed to a
|
562
|
+
terminal unless the CLICOLOR_FORCE variable is defined.</p>
|
563
|
+
|
564
|
+
<p style="margin-top: 1em" valign="top">CLICOLOR_FORCE</p>
|
565
|
+
|
566
|
+
<p style="margin-left:32%; margin-top: 1em">Color sequences
|
567
|
+
are normally disabled if the output isn’t directed to
|
568
|
+
a terminal. This can be overridden by setting this flag. The
|
569
|
+
TERM variable still needs to reference a color capable
|
570
|
+
terminal however otherwise it is not possible to determine
|
571
|
+
which color sequences to use.</p>
|
572
|
+
|
573
|
+
<p style="margin-top: 1em" valign="top">COLUMNS</p>
|
574
|
+
|
575
|
+
<p style="margin-left:32%; margin-top: 1em">If this
|
576
|
+
variable contains a string representing a decimal integer,
|
577
|
+
it is used as the column position width for displaying
|
578
|
+
multiple-text-column output. The <b>ls</b> utility
|
579
|
+
calculates how many pathname text columns to display based
|
580
|
+
on the width provided. (See <b>−C</b> and
|
581
|
+
<b>−x</b>.)</p>
|
582
|
+
|
583
|
+
<p style="margin-top: 1em" valign="top">LANG</p>
|
584
|
+
|
585
|
+
<p style="margin-left:32%; margin-top: 1em">The locale to
|
586
|
+
use when determining the order of day and month in the long
|
587
|
+
<b>−l</b> format output. See environ(7) for more
|
588
|
+
information.</p>
|
589
|
+
|
590
|
+
<p style="margin-top: 1em" valign="top">LSCOLORS</p>
|
591
|
+
|
592
|
+
<p style="margin-left:32%; margin-top: 1em">The value of
|
593
|
+
this variable describes what color to use for which
|
594
|
+
attribute when colors are enabled with CLICOLOR. This string
|
595
|
+
is a concatenation of pairs of the format <i>fb</i>, where
|
596
|
+
<i>f</i> is the foreground color and <i>b</i> is the
|
597
|
+
background color.</p>
|
598
|
+
|
599
|
+
<p style="margin-left:32%; margin-top: 1em">The color
|
600
|
+
designators are as follows:</p>
|
601
|
+
|
602
|
+
<p style="margin-top: 1em" valign="top"><b>a</b></p>
|
603
|
+
|
604
|
+
<p style="margin-left:51%; margin-top: 1em">black</p>
|
605
|
+
|
606
|
+
<p valign="top"><b>b</b></p>
|
607
|
+
|
608
|
+
<p style="margin-left:51%; margin-top: 1em">red</p>
|
609
|
+
|
610
|
+
<p valign="top"><b>c</b></p>
|
611
|
+
|
612
|
+
<p style="margin-left:51%; margin-top: 1em">green</p>
|
613
|
+
|
614
|
+
<p valign="top"><b>d</b></p>
|
615
|
+
|
616
|
+
<p style="margin-left:51%; margin-top: 1em">brown</p>
|
617
|
+
|
618
|
+
<p valign="top"><b>e</b></p>
|
619
|
+
|
620
|
+
<p style="margin-left:51%; margin-top: 1em">blue</p>
|
621
|
+
|
622
|
+
<p valign="top"><b>f</b></p>
|
623
|
+
|
624
|
+
<p style="margin-left:51%; margin-top: 1em">magenta</p>
|
625
|
+
|
626
|
+
<p valign="top"><b>g</b></p>
|
627
|
+
|
628
|
+
<p style="margin-left:51%; margin-top: 1em">cyan</p>
|
629
|
+
|
630
|
+
<p valign="top"><b>h</b></p>
|
631
|
+
|
632
|
+
<p style="margin-left:51%; margin-top: 1em">light grey</p>
|
633
|
+
|
634
|
+
<p valign="top"><b>A</b></p>
|
635
|
+
|
636
|
+
<p style="margin-left:51%; margin-top: 1em">bold black,
|
637
|
+
usually shows up as dark grey</p>
|
638
|
+
|
639
|
+
<p valign="top"><b>B</b></p>
|
640
|
+
|
641
|
+
<p style="margin-left:51%; margin-top: 1em">bold red</p>
|
642
|
+
|
643
|
+
<p valign="top"><b>C</b></p>
|
644
|
+
|
645
|
+
<p style="margin-left:51%; margin-top: 1em">bold green</p>
|
646
|
+
|
647
|
+
<p valign="top"><b>D</b></p>
|
648
|
+
|
649
|
+
<p style="margin-left:51%; margin-top: 1em">bold brown,
|
650
|
+
usually shows up as yellow</p>
|
651
|
+
|
652
|
+
<p valign="top"><b>E</b></p>
|
653
|
+
|
654
|
+
<p style="margin-left:51%; margin-top: 1em">bold blue</p>
|
655
|
+
|
656
|
+
<p valign="top"><b>F</b></p>
|
657
|
+
|
658
|
+
<p style="margin-left:51%; margin-top: 1em">bold
|
659
|
+
magenta</p>
|
660
|
+
|
661
|
+
<p valign="top"><b>G</b></p>
|
662
|
+
|
663
|
+
<p style="margin-left:51%; margin-top: 1em">bold cyan</p>
|
664
|
+
|
665
|
+
<p valign="top"><b>H</b></p>
|
666
|
+
|
667
|
+
<p style="margin-left:51%; margin-top: 1em">bold light
|
668
|
+
grey; looks like bright white</p>
|
669
|
+
|
670
|
+
<p valign="top"><b>x</b></p>
|
671
|
+
|
672
|
+
<p style="margin-left:51%; margin-top: 1em">default
|
673
|
+
foreground or background</p>
|
674
|
+
|
675
|
+
<p style="margin-left:32%; margin-top: 1em">Note that the
|
676
|
+
above are standard ANSI colors. The actual display may
|
677
|
+
differ depending on the color capabilities of the terminal
|
678
|
+
in use.</p>
|
679
|
+
|
680
|
+
<p style="margin-left:32%; margin-top: 1em">The order of
|
681
|
+
the attributes are as follows:</p>
|
682
|
+
|
683
|
+
<p style="margin-top: 1em" valign="top">1.</p>
|
684
|
+
|
685
|
+
<p style="margin-left:49%;">directory</p>
|
686
|
+
|
687
|
+
<p valign="top">2.</p>
|
688
|
+
|
689
|
+
<p style="margin-left:49%;">symbolic link</p>
|
690
|
+
|
691
|
+
<p valign="top">3.</p>
|
692
|
+
|
693
|
+
<p style="margin-left:49%;">socket</p>
|
694
|
+
|
695
|
+
<p valign="top">4.</p>
|
696
|
+
|
697
|
+
<p style="margin-left:49%;">pipe</p>
|
698
|
+
|
699
|
+
<p valign="top">5.</p>
|
700
|
+
|
701
|
+
<p style="margin-left:49%;">executable</p>
|
702
|
+
|
703
|
+
<p valign="top">6.</p>
|
704
|
+
|
705
|
+
<p style="margin-left:49%;">block special</p>
|
706
|
+
|
707
|
+
<p valign="top">7.</p>
|
708
|
+
|
709
|
+
<p style="margin-left:49%;">character special</p>
|
710
|
+
|
711
|
+
<p valign="top">8.</p>
|
712
|
+
|
713
|
+
<p style="margin-left:49%;">executable with setuid bit
|
714
|
+
set</p>
|
715
|
+
|
716
|
+
<p valign="top">9.</p>
|
717
|
+
|
718
|
+
<p style="margin-left:49%;">executable with setgid bit
|
719
|
+
set</p>
|
720
|
+
|
721
|
+
<p valign="top">10.</p>
|
722
|
+
|
723
|
+
<p style="margin-left:49%;">directory writable to others,
|
724
|
+
with sticky bit</p>
|
725
|
+
|
726
|
+
<p valign="top">11.</p>
|
727
|
+
|
728
|
+
<p style="margin-left:49%;">directory writable to others,
|
729
|
+
without sticky bit</p>
|
730
|
+
|
731
|
+
<p style="margin-left:32%; margin-top: 1em">The default is
|
732
|
+
"exfxcxdxbxegedabagacad", i.e. blue foreground and
|
733
|
+
default background for regular directories, black foreground
|
734
|
+
and red background for setuid executables, etc.</p>
|
735
|
+
|
736
|
+
<p style="margin-top: 1em" valign="top">LS_COLWIDTHS</p>
|
737
|
+
|
738
|
+
<p style="margin-left:32%; margin-top: 1em">If this
|
739
|
+
variable is set, it is considered to be a colon-delimited
|
740
|
+
list of minimum column widths. Unreasonable and insufficient
|
741
|
+
widths are ignored (thus zero signifies a dynamically sized
|
742
|
+
column). Not all columns have changeable widths. The fields
|
743
|
+
are, in order: inode, block count, number of links, user
|
744
|
+
name, group name, flags, file size, file name.</p>
|
745
|
+
|
746
|
+
<p style="margin-top: 1em" valign="top">TERM</p>
|
747
|
+
|
748
|
+
<p style="margin-left:32%; margin-top: 1em">The CLICOLOR
|
749
|
+
functionality depends on a terminal type with color
|
750
|
+
capabilities.</p>
|
751
|
+
|
752
|
+
<p style="margin-top: 1em" valign="top">TZ</p>
|
753
|
+
|
754
|
+
<p style="margin-left:32%; margin-top: 1em">The timezone to
|
755
|
+
use when displaying dates. See environ(7) for more
|
756
|
+
information.</p>
|
757
|
+
|
758
|
+
|
759
|
+
<p style="margin-top: 1em" valign="top"><b>COMPATIBILITY</b></p>
|
760
|
+
|
761
|
+
<p style="margin-left:8%;">The group field is now
|
762
|
+
automatically included in the long listing for files in
|
763
|
+
order to be compatible with the IEEE Std 1003.2
|
764
|
+
(‘‘POSIX.2’’) specification.</p>
|
765
|
+
|
766
|
+
<p style="margin-top: 1em" valign="top"><b>LEGACY
|
767
|
+
DESCRIPTION</b></p>
|
768
|
+
|
769
|
+
<p style="margin-left:8%;">In legacy mode, the
|
770
|
+
<b>−f</b> option does not turn on the <b>−a</b>
|
771
|
+
option and the <b>−g</b>, <b>−n</b>, and
|
772
|
+
<b>−o</b> options do not turn on the <b>−l</b>
|
773
|
+
option.</p>
|
774
|
+
|
775
|
+
<p style="margin-left:8%; margin-top: 1em">Also, the
|
776
|
+
<b>−o</b> option causes the file flags to be included
|
777
|
+
in a long (-l) output; there is no <b>−O</b>
|
778
|
+
option.</p>
|
779
|
+
|
780
|
+
<p style="margin-left:8%; margin-top: 1em">When
|
781
|
+
<b>−H</b> is specified (and not overridden by
|
782
|
+
<b>−L</b> or <b>−P</b>) and a file argument is a
|
783
|
+
symlink that resolves to a non-directory file, the output
|
784
|
+
will reflect the nature of the link, rather than that of the
|
785
|
+
file. In legacy operation, the output will describe the
|
786
|
+
file.</p>
|
787
|
+
|
788
|
+
<p style="margin-left:8%; margin-top: 1em">For more
|
789
|
+
information about legacy mode, see compat(5).</p>
|
790
|
+
|
791
|
+
<p style="margin-top: 1em" valign="top"><b>SEE ALSO</b></p>
|
792
|
+
|
793
|
+
<p style="margin-left:8%;">chflags(1), chmod(1), sort(1),
|
794
|
+
xterm(1), compat(5), termcap(5), symlink(7), sticky(8)</p>
|
795
|
+
|
796
|
+
|
797
|
+
<p style="margin-top: 1em" valign="top"><b>STANDARDS</b></p>
|
798
|
+
|
799
|
+
<p style="margin-left:8%;">The <b>ls</b> utility conforms
|
800
|
+
to IEEE Std 1003.1-2001
|
801
|
+
(‘‘POSIX.1’’).</p>
|
802
|
+
|
803
|
+
<p style="margin-top: 1em" valign="top"><b>HISTORY</b></p>
|
804
|
+
|
805
|
+
<p style="margin-left:8%;">An <b>ls</b> command appeared in
|
806
|
+
Version 1 AT&T UNIX.</p>
|
807
|
+
|
808
|
+
<p style="margin-top: 1em" valign="top"><b>BUGS</b></p>
|
809
|
+
|
810
|
+
<p style="margin-left:8%;">To maintain backward
|
811
|
+
compatibility, the relationships between the many options
|
812
|
+
are quite complex.</p>
|
813
|
+
|
814
|
+
<p style="margin-left:8%; margin-top: 1em">BSD May 19,
|
815
|
+
2002 BSD</p>
|
816
|
+
<hr>
|
817
|
+
</body>
|
818
|
+
</html>
|