summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/ls.1
blob: 952b65c84504d1a1ebd5a0b502ce26c475a4d279 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
.\"
.\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
.\" permission to reproduce portions of its copyrighted documentation.
.\" Original documentation from The Open Group can be obtained online at
.\" http://www.opengroup.org/bookstore/.
.\"
.\" The Institute of Electrical and Electronics Engineers and The Open
.\" Group, have given us permission to reprint portions of their
.\" documentation.
.\"
.\" In the following statement, the phrase ``this text'' refers to portions
.\" of the system documentation.
.\"
.\" Portions of this text are reprinted and reproduced in electronic form
.\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
.\" Standard for Information Technology -- Portable Operating System
.\" Interface (POSIX), The Open Group Base Specifications Issue 6,
.\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
.\" Engineers, Inc and The Open Group.  In the event of any discrepancy
.\" between these versions and the original IEEE and The Open Group
.\" Standard, the original IEEE and The Open Group Standard is the referee
.\" document.  The original Standard can be obtained online at
.\" http://www.opengroup.org/unix/online.html.
.\"
.\" This notice shall appear on any product containing this material.
.\"
.\" The contents of this file are subject to the terms of the
.\" Common Development and Distribution License (the "License").
.\" You may not use this file except in compliance with the License.
.\"
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
.\" or http://www.opensolaris.org/os/licensing.
.\" See the License for the specific language governing permissions
.\" and limitations under the License.
.\"
.\" When distributing Covered Code, include this CDDL HEADER in each
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
.\" If applicable, add the following below this CDDL HEADER, with the
.\" fields enclosed by brackets "[]" replaced with your own identifying
.\" information: Portions Copyright [yyyy] [name of copyright owner]
.\"
.\"
.\" Copyright 1989 AT&T
.\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
.\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
.\" Copyright 2014 Nexenta Systems, Inc.  All Rights Reserved.
.\"
.TH LS 1 "Apr 25, 2020"
.SH NAME
ls \- list contents of directory
.SH SYNOPSIS
.nf
\fB/usr/bin/ls\fR [\fB-aAbcCdeEfFghHiklLmnopqrRsStuUwvVx1@\fR]
     [\fB-/ c\fR | \fBv\fR] [\fB-% atime | crtime | ctime | mtime | all\fR]
     [--block-size size] [--color[=\fIwhen\fR]] [--file-type]
     [--si] [--time-style \fIstyle\fR] [\fIfile\fR]...
.fi

.LP
.nf
\fB/usr/xpg4/bin/ls\fR [\fB-aAbcCdeEfFghHiklLmnopqrRsStuUwvVx1@\fR]
     [\fB-/ c\fR | \fBv\fR] [\fB-% atime | crtime | ctime | mtime | all\fR]
     [--block-size size] [--color[=\fIwhen\fR]] [--file-type]
     [--si] [--time-style \fIstyle\fR] [\fIfile\fR]...
.fi

.LP
.nf
\fB/usr/xpg6/bin/ls\fR [\fB-aAbcCdeEfFghHiklLmnopqrRsStuUwvVx1@\fR]
     [\fB-/ c\fR | \fBv\fR] [\fB-% atime | crtime | ctime | mtime | all\fR]
     [--block-size size] [--color[=\fIwhen\fR]] [--file-type]
     [--si] [--time-style \fIstyle\fR] [\fIfile\fR]...
.fi

.SH DESCRIPTION
For each \fIfile\fR that is a directory, \fBls\fR lists the contents of the
directory. For each \fIfile\fR that is an ordinary file, \fBls\fR repeats its
name and any other information requested. The output is sorted alphabetically
by default. When no argument is given, the current directory (\fB\&.\fR) is
listed. When several arguments are given, the arguments are first sorted
appropriately, but file arguments appear before directories and their contents.
.sp
.LP
There are three major listing formats. The default format for output directed
to a terminal is multi\(micolumn with entries sorted down the columns. The
\fB-1\fR option allows single column output and \fB-m\fR enables stream output
format. In order to determine output formats for the \fB-C\fR, \fB-x\fR, and
\fB-m\fR options, \fBls\fR uses an environment variable, \fBCOLUMNS\fR, to
determine the number of character positions available on one output line. If
this variable is not set, the \fBterminfo\fR(5) database is used to determine
the number of columns, based on the environment variable, \fBTERM\fR. If this
information cannot be obtained, 80 columns are assumed. If the \fB-w\fR option
is used, the argument overrides any other column width.
.sp
.LP
The mode printed when the \fB-e\fR, \fB-E\fR, \fB-g\fR, \fB-l\fR, \fB-n\fR,
\fB-o\fR, \fB-v\fR, \fB-V\fR, or \fB-@\fR option is in effect consists of
eleven characters. The first character can be one of the following:
.sp
.ne 2
.na
\fB\fBd\fR\fR
.ad
.sp .6
.RS 4n
The entry is a directory.
.RE

.sp
.ne 2
.na
\fB\fBD\fR\fR
.ad
.sp .6
.RS 4n
The entry is a door.
.RE

.sp
.ne 2
.na
\fB\fBl\fR\fR
.ad
.sp .6
.RS 4n
The entry is a symbolic link.
.RE

.sp
.ne 2
.na
\fB\fBb\fR\fR
.ad
.sp .6
.RS 4n
The entry is a block special file.
.RE

.sp
.ne 2
.na
\fB\fBc\fR\fR
.ad
.sp .6
.RS 4n
The entry is a character special file.
.RE

.sp
.ne 2
.na
\fB\fBp\fR\fR
.ad
.sp .6
.RS 4n
The entry is a \fBFIFO\fR (or "named pipe") special file.
.RE

.sp
.ne 2
.na
\fB\fBP\fR\fR
.ad
.sp .6
.RS 4n
The entry is an event port.
.RE

.sp
.ne 2
.na
\fB\fBs\fR\fR
.ad
.sp .6
.RS 4n
The entry is an \fBAF_UNIX\fR address family socket.
.RE

.sp
.ne 2
.na
\fB\fB\(mi\fR\fR
.ad
.sp .6
.RS 4n
The entry is an ordinary file.
.RE

.sp
.LP
The next 9 characters are interpreted as three sets of three bits each. The
first set refers to the owner's permissions; the next to permissions of others
in the user-group of the file; and the last to all others. Within each set, the
three characters indicate permission to read, to write, and to execute the file
as a program, respectively. For a directory, \fBexecute\fR permission is
interpreted to mean permission to search the directory for a specified file.
The character after permissions is an ACL or extended attributes indicator.
This character is an \fB@\fR if extended attributes are associated with the
file and the \fB-@\fR option is in effect. Otherwise, this character is a plus
sign (\fB+\fR) character if a non-trivial ACL is associated with the file or a
space character if not.
.sp
.LP
If \fB-/\fR and/or \fB-%\fR are in effect, then the extended system attributes
are printed when filesystem supports extended system attributes. The display
looks as follows:
.sp
.in +2
.nf
$ls -/ c  file
-rw-r--r--   1 root     root           0 May 10 14:17 file
                {AHRSadim-u--}

$ls -/ v file
-rw-r--r--   1 root     root           0 May 10 14:17 file
                {archive,hidden,readonly,system,\e
                 appendonly,nodump,immutable,av_modified,\e
                 noav_quarantined,nounlink,nooffline,\e
                 nosparse}

$ls -l -% all file
-rw-r--r--   1 root     root           0 May 10 14:17 file
                timestamp: atime    Jun 25 12:56:44 2007
                timestamp: ctime    May 10 14:20:23 2007
                timestamp: mtime    May 10 14:17:56 2007
                timestamp: crtime   May 10 14:17:56 2007
.fi
.in -2
.sp

.sp
.LP
See the option descriptions of the \fB-/\fR and \fB-%\fR option for details.
.sp
.LP
\fBls\fR \fB-l\fR (the long list) prints its output as follows for the POSIX
locale:
.sp
.in +2
.nf
-rwxrwxrwx+ 1 smith dev   10876  May 16 9:42 part2
.fi
.in -2
.sp

.sp
.LP
Reading from right to left, you see that the current directory holds one file,
named \fBpart2\fR. Next, the last time that file's contents were modified was
\fB9:42 A.M.\fR on \fBMay 16\fR. The file contains 10,876 characters, or bytes.
The owner of the file, or the user, belongs to the group \fBdev\fR (perhaps
indicating \fBdevelopment\fR), and his or her login name is \fBsmith\fR. The
number, in this case \fB1\fR, indicates the number of links to file \fBpart2\fR
(see \fBcp\fR(1)). The plus sign indicates that there is an \fBACL\fR
associated with the file. If the \fB-@\fR option has been specified, the
presence of extended attributes supersede the presence of an \fBACL\fR and the
plus sign is replaced with an 'at' sign (\fB@\fR). Finally, the dash and
letters tell you that user, group, and others have permissions to read, write,
and execute \fBpart2\fR.
.sp
.LP
The execute (\fBx\fR) symbol occupies the third position of the three-character
sequence. A \fB\(mi\fR in the third position would have indicated a denial of
execution permissions.
.sp
.LP
The permissions are indicated as follows:
.sp
.ne 2
.na
\fB\fBr\fR\fR
.ad
.sp .6
.RS 4n
The file is readable.
.RE

.sp
.ne 2
.na
\fB\fBw\fR\fR
.ad
.sp .6
.RS 4n
The file is writable.
.RE

.sp
.ne 2
.na
\fB\fBx\fR\fR
.ad
.sp .6
.RS 4n
The file is executable.
.RE

.sp
.ne 2
.na
\fB\fB\(mi\fR\fR
.ad
.sp .6
.RS 4n
The indicated permission is \fInot\fR granted.
.RE

.sp
.ne 2
.na
\fB\fBs\fR\fR
.ad
.sp .6
.RS 4n
The \fBs\fRet-user-ID or \fBs\fRet-group-ID bit is on, and the corresponding
user or group execution bit is also on.
.RE

.sp
.ne 2
.na
\fB\fBS\fR\fR
.ad
.sp .6
.RS 4n
Undefined bit-state (the set-user-ID or set-group-id bit is on and the user or
group execution bit is off). For group permissions, this applies only to
non-regular files.
.RE

.sp
.ne 2
.na
\fB\fBt\fR\fR
.ad
.sp .6
.RS 4n
The 1000 (octal) bit, or sticky bit, is on (see \fBchmod\fR(1)), and execution
is on.
.RE

.sp
.ne 2
.na
\fB\fBT\fR\fR
.ad
.sp .6
.RS 4n
The 1000 bit is turned on, and execution is off (undefined bit-state).
.RE

.SS "/usr/bin/ls"
.ne 2
.na
\fB\fBl\fR\fR
.ad
.sp .6
.RS 4n
Mandatory locking occurs during access (on a regular file, the set-group-ID bit
is on and the group execution bit is off).
.RE

.SS "/usr/xpg4/bin/ls and /usr/xpg6/bin/ls"
.ne 2
.na
\fB\fBL\fR\fR
.ad
.sp .6
.RS 4n
Mandatory locking occurs during access (on a regular file, the set-group-ID bit
is on and the group execution bit is off).
.RE

.sp
.LP
For user and group permissions, the third position is sometimes occupied by a
character other than \fBx\fR or \fB-\fR. \fBs\fR or \fBS\fR also can occupy
this position, referring to the state of the set-ID bit, whether it be the
user's or the group's. The ability to assume the same ID as the user during
execution is, for example, used during login when you begin as root but need to
assume the identity of the user you login as.
.sp
.LP
In the case of the sequence of group permissions, \fBl\fR can occupy the third
position. \fBl\fR refers to mandatory file and record locking. This permission
describes a file's ability to allow other files to lock its reading or writing
permissions during access.
.sp
.LP
For others permissions, the third position can be occupied by \fBt\fR or
\fBT\fR. These refer to the state of the sticky bit and execution permissions.
.SS "Color Output"
If color output is enabled, the environment variable LS_COLORS is checked.  If
it exists, its contents are used to control the colors used to display
filenames.  If it is not set, a default list of colors is used. The format of
LS_COLORS is a colon separated list of attribute specifications. Each attribute
specification is of the format
.sp
.in +2
.nf
\fIfilespec\fR=\fIattr\fR[;\fIattr\fR..]
.fi
.in -2
.sp

.sp
.LP
\fIfilespec\fR is either of the form \fI*.SUFFIX\fR, for example, \fB*.jar\fR
or \fB*.Z\fR, or one of the following file types:
.sp
.ne 2
.na
\fB\fBno\fR\fR
.ad
.sp .6
.RS 4n
Normal file
.RE

.sp
.ne 2
.na
\fB\fBfi\fR\fR
.ad
.sp .6
.RS 4n
Regular file
.RE

.sp
.ne 2
.na
\fB\fBdi\fR\fR
.ad
.sp .6
.RS 4n
Directory
.RE

.sp
.ne 2
.na
\fB\fBln\fR\fR
.ad
.sp .6
.RS 4n
Symbolic link
.RE

.sp
.ne 2
.na
\fB\fBpi\fR\fR
.ad
.sp .6
.RS 4n
FIFO or named pipe
.RE

.sp
.ne 2
.na
\fB\fBso\fR\fR
.ad
.sp .6
.RS 4n
Socket
.RE

.sp
.ne 2
.na
\fB\fBdo\fR\fR
.ad
.sp .6
.RS 4n
Door file
.RE

.sp
.ne 2
.na
\fB\fBbd\fR\fR
.ad
.sp .6
.RS 4n
Block device
.RE

.sp
.ne 2
.na
\fB\fBcd\fR\fR
.ad
.sp .6
.RS 4n
Character device
.RE

.sp
.ne 2
.na
\fB\fBex\fR\fR
.ad
.sp .6
.RS 4n
Execute bit (either \fBuser\fR, \fBgroup\fR, or \fBother\fR) set
.RE

.sp
.ne 2
.na
\fB\fBpo\fR\fR
.ad
.sp .6
.RS 4n
Event port
.RE

.sp
.ne 2
.na
\fB\fBst\fR\fR
.ad
.sp .6
.RS 4n
Sticky bit set
.RE

.sp
.ne 2
.na
\fB\fBor\fR\fR
.ad
.sp .6
.RS 4n
Orphaned symlink
.RE

.sp
.ne 2
.na
\fB\fBsg\fR\fR
.ad
.sp .6
.RS 4n
\fBsetgid\fR binary
.RE

.sp
.ne 2
.na
\fB\fBsu\fR\fR
.ad
.sp .6
.RS 4n
\fBsetuid\fR binary
.RE

.sp
.ne 2
.na
\fB\fBow\fR\fR
.ad
.sp .6
.RS 4n
\fBworld\fR writable
.RE

.sp
.ne 2
.na
\fB\fBtw\fR\fR
.ad
.sp .6
.RS 4n
Sticky bit and \fBworld\fR writable
.RE

.sp
.LP
\fIattr\fR is a semicolon delimited list of color and display attributes which
are combined to determine the final output color. Any combination of \fIattr\fR
values can be specified. Possible \fIattr\fR values are:
.sp
.ne 2
.na
\fB\fB00\fR\fR
.ad
.sp .6
.RS 4n
All attributes off (default terminal color)
.RE

.sp
.ne 2
.na
\fB\fB01\fR\fR
.ad
.sp .6
.RS 4n
Display text in bold
.RE

.sp
.ne 2
.na
\fB\fB04\fR\fR
.ad
.sp .6
.RS 4n
Display text with an underscore
.RE

.sp
.ne 2
.na
\fB\fB05\fR\fR
.ad
.sp .6
.RS 4n
Display text in bold
.RE

.sp
.ne 2
.na
\fB\fB07\fR\fR
.ad
.sp .6
.RS 4n
Display text with foreground and background colors reversed
.RE

.sp
.ne 2
.na
\fB\fB08\fR\fR
.ad
.sp .6
.RS 4n
Display using concealed text.
.RE

.sp
.LP
One of the following values can be chosen. If multiple values are specified,
the last specified value is used.
.sp
.ne 2
.na
\fB\fB30\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBblack\fR.
.RE

.sp
.ne 2
.na
\fB\fB31\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBred\fR.
.RE

.sp
.ne 2
.na
\fB\fB32\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBgreen\fR.
.RE

.sp
.ne 2
.na
\fB\fB33\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fByellow\fR.
.RE

.sp
.ne 2
.na
\fB\fB34\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBblue\fR.
.RE

.sp
.ne 2
.na
\fB\fB35\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBmagenta\fR (\fBpurple\fR).
.sp
Set foreground to \fB\fR.
.RE

.sp
.ne 2
.na
\fB\fB36\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBcyan\fR.
.RE

.sp
.ne 2
.na
\fB\fB37\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBwhite\fR.
.RE

.sp
.ne 2
.na
\fB\fB39\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to default terminal color.
.RE

.sp
.LP
One of the following can be specified. If multiple values are specified, the
last value specified is used.
.sp
.ne 2
.na
\fB\fB40\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBblack\fR.
.RE

.sp
.ne 2
.na
\fB\fB41\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBred\fR.
.RE

.sp
.ne 2
.na
\fB\fB42\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBgreen\fR.
.RE

.sp
.ne 2
.na
\fB\fB43\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fByellow\fR.
.RE

.sp
.ne 2
.na
\fB\fB44\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBblue\fR.
.RE

.sp
.ne 2
.na
\fB\fB45\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBmagenta\fR (\fBpurple\fR).
.RE

.sp
.ne 2
.na
\fB\fB46\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBcyan\fR.
.RE

.sp
.ne 2
.na
\fB\fB47\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to \fBwhite\fR.
.RE

.sp
.ne 2
.na
\fB\fB49\fR\fR
.ad
.sp .6
.RS 4n
Set foreground to default terminal color.
.RE

.sp
.LP
On some terminals, setting the bold attribute causes the foreground colors to
be high-intensity, that is, brighter. In such cases the low-intensity yellow is
often displayed as a brown or orange color.
.sp
.LP
At least one attribute must be listed for a file specification.
.sp
.LP
The appropriate color codes are chosen by selecting the most specific match,
starting with the file suffixes and proceeding with the file types until a
match is found. The \fBno\fR (normal file) type matches any file.
.SH OPTIONS
The following options are supported:
.SS "/usr/bin/ls, /usr/xpg4/bin/ls, and /usr/xpg6/bin/ls"
The following options are supported for all three versions:
.sp
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.br
.na
\fB\fB--all\fR\fR
.ad
.sp .6
.RS 4n
Lists all entries, including those that begin with a dot (\fB\&.\fR), which are
normally not listed.
.RE

.sp
.ne 2
.na
\fB\fB-A\fR\fR
.ad
.br
.na
\fB\fB--almost-all\fR\fR
.ad
.sp .6
.RS 4n
Lists all entries, including those that begin with a dot (\fB\&.\fR), with the
exception of the working directory (\fB\&.\fR) and the parent directory
(\fB\&..\fR).
.RE

.sp
.ne 2
.na
\fB\fB-b\fR\fR
.ad
.br
.na
\fB\fB--escape\fR\fR
.ad
.sp .6
.RS 4n
Forces printing of non-printable characters to be in the octal
\fB\e\fR\fIddd\fR notation.
.RE

.sp
.ne 2
.na
\fB\fB-B\fR\fR
.ad
.br
.na
\fB\fB--ignore-backups\fR\fR
.ad
.sp .6
.RS 4n
Do not display any files ending with a tilde (\fB~\fR).
.RE

.sp
.ne 2
.na
\fB\fB-c\fR\fR
.ad
.sp .6
.RS 4n
Uses time of last modification of the i-node (file created, mode changed, and
so forth) for sorting (\fB-t\fR) or printing (\fB-l\fR or \fB-n\fR).
.RE

.sp
.ne 2
.na
\fB\fB-C\fR\fR
.ad
.sp .6
.RS 4n
Multi-column output with entries sorted down the columns. This is the default
output format.
.RE

.sp
.ne 2
.na
\fB\fB-d\fR\fR
.ad
.sp .6
.RS 4n
If an argument is a directory, lists only its name (not its contents). Often
used with \fB-l\fR to get the status of a directory.
.RE

.sp
.ne 2
.na
\fB\fB-e\fR\fR
.ad
.sp .6
.RS 4n
The same as \fB-l\fR, except displays time to the second, and with one format
for all files regardless of age: \fImmm dd hh:mm:ss yyyy\fR.
.RE

.sp
.ne 2
.na
\fB\fB-E\fR\fR
.ad
.sp .6
.RS 4n
The same as \fB-l\fR, except displays time to the nanosecond and with one
format for all files regardless of age: \fIyyyy-mm-dd hh:mm:ss.nnnnnnnnn\fR
(ISO 8601:2000 format).
.sp
In addition, this option displays the offset from UTC in ISO 8601:2000 standard
format (+\fIhhmm\fR or -\fIhhmm\fR) or no characters if the offset is
indeterminable. The offset reflects the appropriate standard or alternate
offset in force at the file's displayed date and time, under the current
timezone.
.RE

.sp
.ne 2
.na
\fB\fB-f\fR\fR
.ad
.sp .6
.RS 4n
Forces each argument to be interpreted as a directory and list the name found
in each slot. This option turns off \fB-l\fR, \fB-t\fR, \fB-s\fR, \fB-S\fR, and
\fB-r\fR, and turns on \fB-a\fR. The order is the order in which entries appear
in the directory.
.RE

.sp
.ne 2
.na
\fB\fB-F\fR\fR
.ad
.br
.na
\fB\fB--classify\fR\fR
.ad
.sp .6
.RS 4n
Append a symbol after certain types of files to indicate the file type. The
following symbols are used:
.sp
.ne 2
.na
\fB\fB/\fR\fR
.ad
.sp .6
.RS 4n
Directory
.RE

.sp
.ne 2
.na
\fB\fB>\fR\fR
.ad
.sp .6
.RS 4n
Door file
.RE

.sp
.ne 2
.na
\fB\fB|\fR\fR
.ad
.sp .6
.RS 4n
Named pipe (\fBFIFO\fR)
.RE

.sp
.ne 2
.na
\fB\fB@\fR\fR
.ad
.sp .6
.RS 4n
Symbolic link
.RE

.sp
.ne 2
.na
\fB\fB=\fR\fR
.ad
.sp .6
.RS 4n
Socket
.RE

.sp
.ne 2
.na
\fB\fB*\fR\fR
.ad
.sp .6
.RS 4n
Executable
.RE

.RE

.sp
.ne 2
.na
\fB\fB-g\fR\fR
.ad
.sp .6
.RS 4n
The same as \fB-l\fR, except that the owner is not printed.
.RE

.sp
.ne 2
.na
\fB\fB-h\fR\fR
.ad
.br
.na
\fB\fB--human-readable\fR\fR
.ad
.sp .6
.RS 4n
All sizes are scaled to a human readable format, for example, \fB14K\fR,
\fB234M\fR, \fB2.7G\fR, or \fB3.0T\fR. Scaling is done by repetitively dividing
by \fB1024\fR. The last --si or -h option determines the divisor used.
.RE

.sp
.ne 2
.na
\fB\fB-H\fR\fR
.ad
.br
.na
\fB\fB--dereference-command-line\fR\fR
.ad
.sp .6
.RS 4n
If an argument is a symbolic link that references a directory, this option
evaluates the file information and file type of the directory that the link
references, rather than those of the link itself. However, the name of the link
is displayed, rather than the referenced directory.
.RE

.sp
.ne 2
.na
\fB\fB-i\fR\fR
.ad
.br
.na
\fB\fB--inode\fR\fR
.ad
.sp .6
.RS 4n
For each file, prints the i-node number in the first column of the report.
.RE

.sp
.ne 2
.na
\fB\fB-k\fR\fR
.ad
.sp .6
.RS 4n
All sizes are printed in kbytes. Equivalent to --block-size=1024.
.RE

.sp
.ne 2
.na
\fB\fB-l\fR\fR
.ad
.sp .6
.RS 4n
Lists in long format, giving mode, \fBACL\fR indication, number of links,
owner, group, size in bytes, and time of last modification for each file (see
above). If the file is a special file, the size field instead contains the
major and minor device numbers. If the time of last modification is greater
than six months ago, it is shown in the format `month date year' for the POSIX
locale. When the \fBLC_TIME\fR locale category is not set to the POSIX locale,
a different format of the time field can be used. Files modified within six
months show `month date time'. If the file is a symbolic link, the filename is
printed followed by "\fB\(->\fR" and the path name of the referenced file.
.RE

.sp
.ne 2
.na
\fB\fB-L\fR\fR
.ad
.br
.na
\fB\fB--dereference\fR\fR
.ad
.sp .6
.RS 4n
If an argument is a symbolic link, this option evaluates the file information
and file type of the file or directory that the link references, rather than
those of the link itself. However, the name of the link is displayed, rather
than the referenced file or directory.
.RE

.sp
.ne 2
.na
\fB\fB-m\fR\fR
.ad
.sp .6
.RS 4n
Streams output format. Files are listed across the page, separated by commas.
.RE

.sp
.ne 2
.na
\fB\fB-n\fR\fR
.ad
.br
.na
\fB\fB--numeric-uid-gid\fR\fR
.ad
.sp .6
.RS 4n
The same as \fB-l\fR, except that the owner's \fBUID\fR and group's \fBGID\fR
numbers are printed, rather than the associated character strings.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR\fR
.ad
.br
.na
\fB\fB--no-group\fR\fR
.ad
.sp .6
.RS 4n
The same as \fB-l\fR, except that the group is not printed.
.RE

.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.sp .6
.RS 4n
Puts a slash (\fB/\fR) after each filename if the file is a directory.
.RE

.sp
.ne 2
.na
\fB\fB-q\fR\fR
.ad
.br
.na
\fB\fB--hide-control-chars\fR\fR
.ad
.sp .6
.RS 4n
Forces printing of non-printable characters in file names as the character
question mark (\fB?\fR).
.RE

.sp
.ne 2
.na
\fB\fB-r\fR\fR
.ad
.br
.na
\fB\fB--reverse\fR\fR
.ad
.sp .6
.RS 4n
Reverses the order of sort to get reverse alphabetic, oldest first, or smallest
file size first as appropriate.
.RE

.sp
.ne 2
.na
\fB\fB-R\fR\fR
.ad
.br
.na
\fB\fB--recursive\fR\fR
.ad
.sp .6
.RS 4n
Recursively lists subdirectories encountered.
.RE

.sp
.ne 2
.na
\fB\fB-s\fR\fR
.ad
.br
.na
\fB\fB--size\fR\fR
.ad
.sp .6
.RS 4n
Indicate the total number of file system blocks consumed by each file
displayed.
.RE

.sp
.ne 2
.na
\fB\fB-S\fR\fR
.ad
.sp .6
.RS 4n
Sort by file size (in decreasing order) and for files with the same size by
file name (in increasing alphabetic order) instead of just by name.
.RE

.sp
.ne 2
.na
\fB\fB-t\fR\fR
.ad
.sp .6
.RS 4n
Sorts by time stamp (latest first) instead of by name. The default is the last
modification time. See \fB-c\fR, \fB-u\fR and \fB-%\fR.
.RE

.sp
.ne 2
.na
\fB\fB-u\fR\fR
.ad
.sp .6
.RS 4n
Uses time of last access instead of last modification for sorting (with the
\fB-t\fR option) or printing (with the \fB-l\fR option).
.RE

.sp
.ne 2
.na
\fB\fB-U\fR\fR
.ad
.sp .6
.RS 4n
Output is unsorted.
.RE

.sp
.ne 2
.na
\fB\fB-v\fR\fR
.ad
.sp .6
.RS 4n
The same as \fB-l\fR, except that verbose ACL information is displayed as well
as the \fB-l\fR output. ACL information is displayed even if the file or
directory doesn't have an ACL.
.RE

.sp
.ne 2
.na
\fB\fB-V\fR\fR
.ad
.sp .6
.RS 4n
The same as \fB-l\fR, except that compact ACL information is displayed after
the \fB-l\fR output.
.sp
The \fB-V\fR option is only applicable to file systems that support NFSv4 ACLs,
such as the Solaris ZFS file system.
.sp
The format of the displayed ACL is as follows:
.sp
.in +2
.nf
\fIentry_type\fR : \fIpermissions\fR : \fIinheritance_flags\fR : \fIaccess_type\fR
.fi
.in -2
.sp

\fIentry_type\fR is displayed as one of the following:
.sp
.ne 2
.na
\fBuser:\fIusername\fR\fR
.ad
.sp .6
.RS 4n
Additional user access for \fIusername\fR.
.RE

.sp
.ne 2
.na
\fBgroup:\fIgroupname\fR\fR
.ad
.sp .6
.RS 4n
Additional group access for group \fIgroupname\fR.
.RE

.sp
.ne 2
.na
\fBowner@\fR
.ad
.sp .6
.RS 4n
File owner.
.RE

.sp
.ne 2
.na
\fBgroup@\fR
.ad
.sp .6
.RS 4n
File group owner.
.RE

.sp
.ne 2
.na
\fBeveryone@\fR
.ad
.sp .6
.RS 4n
Everyone access, including file owner and file group owner. This is not
equivalent to the POSIX other class.
.RE

The following permissions, supported by the NFSv4 ACL model, are displayed by
using the \fB-v\fR or \fB-V\fR options:
.sp
.ne 2
.na
\fBread_data (\fBr\fR)\fR
.ad
.sp .6
.RS 4n
Permission to read the data of a file.
.RE

.sp
.ne 2
.na
\fBlist_directory (\fBr\fR)\fR
.ad
.sp .6
.RS 4n
Permission to list the contents of a directory.
.RE

.sp
.ne 2
.na
\fBwrite_data (\fBw\fR)\fR
.ad
.sp .6
.RS 4n
Permission to modify a file's data. anywhere in the file's offset range.
.RE

.sp
.ne 2
.na
\fBadd_file (\fBw\fR)\fR
.ad
.sp .6
.RS 4n
Permission to add a new file to a directory.
.RE

.sp
.ne 2
.na
\fBappend_data (\fBp\fR)\fR
.ad
.sp .6
.RS 4n
The ability to modify a file's data, but only starting at EOF.
.RE

.sp
.ne 2
.na
\fBadd_subdirectory (\fBp\fR)\fR
.ad
.sp .6
.RS 4n
Permission to create a subdirectory to a directory.
.RE

.sp
.ne 2
.na
\fBread_xattr (\fBR\fR)\fR
.ad
.sp .6
.RS 4n
Ability to read the extended attributes of a file.
.RE

.sp
.ne 2
.na
\fBwrite_xattr (\fBW\fR)\fR
.ad
.sp .6
.RS 4n
Ability to create extended attributes or write to the extended attribute
directory.
.RE

.sp
.ne 2
.na
\fBexecute (\fBx\fR)\fR
.ad
.sp .6
.RS 4n
Permission to execute a file.
.RE

.sp
.ne 2
.na
\fBread_attributes (\fBa\fR)\fR
.ad
.sp .6
.RS 4n
The ability to read basic attributes (non-ACLs) of a file.
.RE

.sp
.ne 2
.na
\fBwrite_attributes (\fBA\fR)\fR
.ad
.sp .6
.RS 4n
Permission to change the times associated with a file or directory to an
arbitrary value.
.RE

.sp
.ne 2
.na
\fBdelete (\fBd\fR)\fR
.ad
.sp .6
.RS 4n
Permission to delete a file.
.RE

.sp
.ne 2
.na
\fBdelete_child (\fBD\fR)\fR
.ad
.sp .6
.RS 4n
Permission to delete a file within a directory.
.RE

.sp
.ne 2
.na
\fBread_acl (\fBc\fR)\fR
.ad
.sp .6
.RS 4n
Permission to read the ACL of a file.
.RE

.sp
.ne 2
.na
\fBwrite_acl (\fBC\fR)\fR
.ad
.sp .6
.RS 4n
Permission to write the ACL of a file.
.RE

.sp
.ne 2
.na
\fBwrite_owner (\fBo\fR)\fR
.ad
.sp .6
.RS 4n
Permission to change the owner of a file.
.RE

.sp
.ne 2
.na
\fBsynchronize (\fBs\fR)\fR
.ad
.sp .6
.RS 4n
Permission to access file locally at server with synchronize reads and writes.
.RE

.sp
.ne 2
.na
\fB\fB-\fR\fR
.ad
.sp .6
.RS 4n
No permission granted
.RE

The following inheritance flags, supported by the NFSv4 ACL model, are
displayed by using the \fB-v\fR or \fB-V\fR options:
.sp
.ne 2
.na
\fBfile_inherit (\fBf\fR)\fR
.ad
.sp .6
.RS 4n
Inherit to all newly created files.
.RE

.sp
.ne 2
.na
\fBdir_inherit (\fBd\fR)\fR
.ad
.sp .6
.RS 4n
Inherit to all newly created directories.
.RE

.sp
.ne 2
.na
\fBinherit_only (\fBi\fR)\fR
.ad
.sp .6
.RS 4n
When placed on a directory, do not apply to the directory, only to newly
created files and directories. This flag requires that either
\fBfile_inherit\fR and or \fBdir_inherit\fR is also specified.
.RE

.sp
.ne 2
.na
\fBno_propagate (\fBn\fR)\fR
.ad
.sp .6
.RS 4n
Indicates that ACL entries should be inherited to objects in a directory, but
inheritance should stop after descending one level. This flag is dependent upon
either \fBfile_inherit\fR and or \fBdir_inherit\fR also being specified.
.RE

.sp
.ne 2
.na
\fBsuccessful_access (\fBS\fR)\fR
.ad
.sp .6
.RS 4n
Indicates whether an alarm or audit record should be initiated upon successful
accesses. Used with audit/alarm ACE types.
.RE

.sp
.ne 2
.na
\fBfailed_access (\fBF\fR)\fR
.ad
.sp .6
.RS 4n
Indicates whether an alarm or audit record should be initiated when access
fails. Used with audit/alarm ACE types.
.RE

.sp
.ne 2
.na
\fBinherited (\fBI\fR)\fR
.ad
.sp .6
.RS 4n
ACE was inherited.
.RE

.sp
.ne 2
.na
\fB\fB-\fR\fR
.ad
.sp .6
.RS 4n
No permission granted.
.RE

\fIaccess_type\fR is displayed as one of the following types:
.sp
.ne 2
.na
\fBalarm\fR
.ad
.RS 9n
Permission field that specifies permissions that should trigger an alarm.
.RE

.sp
.ne 2
.na
\fBallow\fR
.ad
.RS 9n
Permission field that specifies allow permissions.
.RE

.sp
.ne 2
.na
\fBaudit\fR
.ad
.RS 9n
Permission field that specifies permissions that should be audited.
.RE

.sp
.ne 2
.na
\fBdeny\fR
.ad
.RS 9n
Permission field that specifies deny permissions.
.RE

For example:
.sp
.in +2
.nf
$ ls -dV /sandbox/dir.1
  drwxr-xr-x+  2 root     root           2 Jan 17 15:09 dir.1
                  user:marks:r-------------:fd-----:allow
                      owner@:--------------:-------:deny
                      owner@:rwxp---A-W-Co-:-------:allow
                      group@:-w-p----------:-------:deny
                      group@:r-x-----------:-------:allow
                   everyone@:-w-p---A-W-Co-:-------:deny
                   everyone@:r-x---a-R-c--s:-------:allow
$
                           ||||||||||||||||:||||||+ inherited access
                             ||||||||||||||:||||||+ failed access
                             ||||||||||||||:|||||+--success access
                             ||||||||||||||:||||+-- no propagate
                             ||||||||||||||:|||+--- inherit only
                             ||||||||||||||:||+---- directory inherit
                             ||||||||||||||:|+----- file inherit
                             ||||||||||||||
                             ||||||||||||||+ sync
                             |||||||||||||+- change owner
                             ||||||||||||+-- write ACL
                             |||||||||||+--- read ACL
                             ||||||||||+---- write extended attributes
                             |||||||||+----- read extended attributes
                             ||||||||+------ write attributes
                             |||||||+------- read attributes
                             ||||||+-------- delete child
                             |||||+--------- delete
                             ||||+---------- append
                             |||+----------- execute
                             ||+------------ write data
                             |+------------- read data
.fi
.in -2
.sp

.RE

.sp
.ne 2
.na
\fB\fB-w\fR \fIcols\fR\fR
.ad
.br
.na
\fB\fB--width\fR \fIcols\fR\fR
.ad
.sp .6
.RS 4n
Multi-column output where the column width is forced to \fIcols\fR.
.RE

.sp
.ne 2
.na
\fB\fB-x\fR\fR
.ad
.sp .6
.RS 4n
Multi-column output with entries sorted across rather than down the page.
.RE

.sp
.ne 2
.na
\fB\fB-1\fR\fR
.ad
.sp .6
.RS 4n
Prints one entry per line of output.
.RE

.sp
.ne 2
.na
\fB\fB-@\fR\fR
.ad
.sp .6
.RS 4n
The same as \fB-l\fR, except that extended attribute information overrides
\fBACL\fR information. An \fB@\fR is displayed after the file permission bits
for files that have extended attributes.
.RE

.sp
.ne 2
.na
\fB\fB-/ c\fR | \fBv\fR\fR
.ad
.sp .6
.RS 4n
The same as \fB-l\fR, and in addition displays the extended system attributes
associated with the file when extended system attributes are fully supported by
the underlying file system. The option \fB-/\fR supports two option arguments
\fBc\fR (compact mode) and \fBv\fR (verbose mode).
.sp
.ne 2
.na
\fB\fBappendonly\fR\fR
.ad
.sp .6
.RS 4n
Allows a file to be modified only at offset \fBEOF\fR. Attempts to modify a
file at a location other than \fBEOF\fR fails with \fBEPERM\fR.
.RE

.sp
.ne 2
.na
\fB\fBarchive\fR\fR
.ad
.sp .6
.RS 4n
Indicates if a file has been modified since it was last backed up. Whenever the
modification time (\fBmtime\fR) of a file is changed the \fBarchive\fR
attribute is set.
.RE

.sp
.ne 2
.na
\fB\fBav_modified\fR\fR
.ad
.sp .6
.RS 4n
ZFS sets the anti-virus attribute which whenever a file's content or size
changes or when the file is renamed.
.RE

.sp
.ne 2
.na
\fB\fBav_quarantined\fR\fR
.ad
.sp .6
.RS 4n
Anti-virus software sets to mark a file as quarantined.
.RE

.sp
.ne 2
.na
\fB\fBcrtime\fR\fR
.ad
.sp .6
.RS 4n
Timestamp when a file is created.
.RE

.sp
.ne 2
.na
\fB\fBhidden\fR\fR
.ad
.sp .6
.RS 4n
Marks a file as hidden.
.RE

.sp
.ne 2
.na
\fB\fBimmutable\fR\fR
.ad
.sp .6
.RS 4n
Prevents the content of a file from being modified. Also prevents all metadata
changes, except for access time updates. When placed on a directory, prevents
the deletion and creation of files in the directories. Attempts to modify the
content of a file or directory marked as \fBimmutable\fR fail with \fBEPERM\fR.
Attempts to modify any attributes (with the exception of access time and, with
the proper privileges, the \fBimmutable\fR) of a file marked as \fBimmutable\fR
fails with \fBEPERM\fR.
.RE

.sp
.ne 2
.na
\fB\fBnodump\fR\fR
.ad
.sp .6
.RS 4n
Solaris systems have no special semantics for this attribute.
.RE

.sp
.ne 2
.na
\fB\fBnounlink\fR\fR
.ad
.sp .6
.RS 4n
Prevents a file from being deleted. On a directory, the attribute also prevents
any changes to the contents of the directory. That is, no files within the
directory can be removed or renamed. The \fBerrno\fR \fBEPERM\fR is returned
when attempting to unlink or rename files and directories that are marked as
\fBnounlink\fR.
.RE

.sp
.ne 2
.na
\fB\fBoffline\fR\fR
.ad
.sp .6
.RS 4n
Indicate that a file is offline.  Solaris systems have no special semantics for
this attribute.
.RE

.sp
.ne 2
.na
\fB\fBreadonly\fR\fR
.ad
.sp .6
.RS 4n
Marks a file as \fBreadonly\fR. Once a file is marked as \fBreadonly\fR the
content data of the file cannot be modified. Other metadata for the file can
still be modified.
.RE

.sp
.ne 2
.na
\fB\fBsparse\fR\fR
.ad
.sp .6
.RS 4n
Indicate that a file can be interpreted as sparse.  It does not indicate that
the file is actually sparse or not.  The sparse attribute is cleared when the
file is truncated to zero length.  Solaris systems have no other special
semantics for this attribute.
.RE

.sp
.ne 2
.na
\fB\fBsystem\fR\fR
.ad
.sp .6
.RS 4n
Solaris systems have no special semantics for this attribute.
.RE

.RE

.sp
.LP
The display characters used in compact mode (\fB-/ c\fR) are as follows:
.sp
.in +2
.nf
Attribute Name     Display
archive            A
hidden             H
readonly           R
system             S
appendonly         a
nodump             d
immutable          i
av_modified        m
av_quarantined     q
nounlink           u
offline            O
sparse             s
.fi
.in -2
.sp

.sp
.LP
The display in verbose mode (\fB-/ v\fR) uses full attribute names when it is set and
the name prefixed by 'no' when it is not set.
.sp
.LP
The attribute name \fBcrtime\fR and all other timestamps are handled by the
option \fB-%\fR with the respective timestamp option arguments and also with
\fBall\fR option argument. The display positions are as follows: The display in
verbose mode (\fB-/ v\fR) uses full attribute names  when it is set and the
name prefixed by \fBno\fR when it is not set. The attribute name \fBcrtime\fR
and all other timestamps are handled by the option \fB-%\fR with the respective
timestamp option arguments and also with \fBall\fR option argument.
.sp
.LP
The display positions are as follows:
.sp
.in +2
.nf
{||||||||||||}
 |||||||||||+- s (sparse)
 ||||||||||+-- O (offline)
 |||||||||+--- u (nounlink)
 ||||||||+---- q (av_quarantined)
 |||||||+----- m (av_modified)
 ||||||+------ i (immutable)
 |||||+------- d (nodump)
 ||||+-------- a (appendonly)
 |||+--------- S (system)
 ||+---------- R (readonly)
 |+----------- H (hidden)
 +------------ A (archive)
.fi
.in -2
.sp

.sp
.in +2
.nf
-% atime | crtime | ctime | mtime | all
.fi
.in -2
.sp

.sp
.ne 2
.na
\fB\fBatime\fR\fR
.ad
.sp .6
.RS 4n
Equivalent to \fB-u\fR.
.RE

.sp
.ne 2
.na
\fB\fBcrtime\fR\fR
.ad
.sp .6
.RS 4n
Uses the creation time of the file for sorting or printing.
.RE

.sp
.ne 2
.na
\fB\fBctime\fR\fR
.ad
.sp .6
.RS 4n
Equivalent to \fB-c\fR.
.RE

.sp
.ne 2
.na
\fB\fBmtime\fR\fR
.ad
.sp .6
.RS 4n
Uses the last modification time of the file contents for sorting or printing.
.RE

.sp
.LP
If extended system attributes are not supported or if the user does not have
\fBread\fR permission on the file or if the \fBcrtime\fR extended attribute is
not set, \fBcrtime\fR is treated as a synonym for \fBmtime\fR.
.sp
.LP
When option argument \fBall\fR is specified, all available timestamps are
printed which includes \fBatime\fR, \fBctime\fR, \fBmtime\fR and on the
extended system attribute supporting file systems, \fBcrtime\fR (create time).
The option \fB-% all\fR does not effect which timestamp is displayed in long
format and does not affect sorting.
.sp
.ne 2
.na
\fB\fB--block-size\fR \fIsize\fR\fR
.ad
.sp .6
.RS 4n
Display sizes in multiples of size. Size can be scaled by suffixing one of
\fBYyZzEePpTtGgMmKk\fR. Additionally, a \fBB\fR can be placed at the end to
indicate powers of 10 instead of 2. For example, . \fB10mB\fR means blocks of
\fB10000000\fR bytes while \fB10m\fR means blocks of \fB10*2^20 -- 10485760
--\fR bytes. This is mutually exclusive with the \fB-h\fR option.
.RE

.sp
.ne 2
.na
\fB\fB--color\fR \fB[=\fR\fIwhen\fR\fB]\fR\fR
.ad
.br
.na
\fB\fB--colour\fR\fB[=\fR\fIwhen\fR\fB]\fR\fR
.ad
.sp .6
.RS 4n
Display filenames using color on color-capable terminals. \fIwhen\fR is an
optional argument that determines when to display color output.
.sp
Possible values for \fIwhen\fR are:
.sp
.ne 2
.na
\fB\fBalways\fR\fR
.ad
.br
.na
\fB\fByes\fR\fR
.ad
.br
.na
\fB\fBforce\fR\fR
.ad
.sp .6
.RS 4n
Always use color.
.RE

.sp
.ne 2
.na
\fB\fBauto\fR\fR
.ad
.br
.na
\fB\fBtty\fR\fR
.ad
.br
.na
\fB\fBif-tty\fR\fR
.ad
.sp .6
.RS 4n
Use color if a terminal is present.
.RE

.sp
.ne 2
.na
\fB\fBno\fR\fR
.ad
.br
.na
\fB\fBnever\fR\fR
.ad
.br
.na
\fB\fBnone\fR\fR
.ad
.sp .6
.RS 4n
Never use color. This is the default
.RE

See \fBCOLOR OUTPUT\fR for information on how to control the output colors.
.RE

.sp
.ne 2
.na
\fB\fB--file-type\fR\fR
.ad
.sp .6
.RS 4n
Display a suffix after a file depending on its type, similar to the \fB-F\fR
option, except \fB*\fR is not appended to executable files.
.RE

.sp
.ne 2
.na
\fB\fB-si\fR\fR
.ad
.br
.na
\fB\fB--\fR\fR
.ad
.sp .6
.RS 4n
Display human scaled sizes similar to the \fB-h\fR option, except values are
repeatedly divided by 1000 instead of 1024. The last option \fB--si\fR or
\fB-h\fR determines the divisor used.
.RE

.sp
.ne 2
.na
\fB\fB--time-style\fR style\fR
.ad
.sp .6
.RS 4n
Display times using the specified style. This does not effect the times
displayed for extended attributes (\fB-%\fR).
.sp
Possible values for \fIstyle\fR are:
.sp
.ne 2
.na
\fB\fBfull-iso\fR\fR
.ad
.sp .6
.RS 4n
Equivalent to \fB-E\fR.
.RE

.sp
.ne 2
.na
\fB\fBlong-iso\fR\fR
.ad
.sp .6
.RS 4n
Display in \fIYYYY-MM-DD HH:MM\fR for all files.
.RE

.sp
.ne 2
.na
\fB\fBiso\fR\fR
.ad
.sp .6
.RS 4n
Display older files using \fIYYYY-MM-DD\fR and newer files with \fIMM-DD
HH:MM\fR.
.RE

.sp
.ne 2
.na
\fB\fBlocale\fR\fR
.ad
.sp .6
.RS 4n
Use the default locale format for old and new files. This is the default.
.RE

.sp
.ne 2
.na
\fB\fB+FORMAT\fR\fR
.ad
.sp .6
.RS 4n
Use a custom format. Values are the same as described in \fBstrftime\fR(3C). If
a NEWLINE appears in the string, the first line is used for older files and the
second line is used for newer files. Otherwise, the given format is used for
all files.
.RE

.RE

.SS "/usr/bin/ls"
.ne 2
.na
\fB\fB-F\fR\fR
.ad
.sp .6
.RS 4n
Marks directories with a trailing slash (\fB/\fR), doors with a trailing
greater-than sign (\fB>\fR), executable files with a trailing asterisk
(\fB*\fR), \fBFIFO\fRs with a trailing vertical bar (\fB|\fR), symbolic links
with a trailing "at" sign (\fB@\fR), and \fBAF_UNIX\fR address family sockets
with a trailing equals sign (\fB=\fR). Follows \fBsymlinks\fR named as
operands.
.RE

.sp
.ne 2
.na
\fB\fB--file-type\fR\fR
.ad
.sp .6
.RS 4n
Marks entries as with \fB-F\fR with the exception of executable files.
Executable files are not marked. Follows symlinks named as operands.
.RE

.sp
.LP
Specifying more than one of the options in the following mutually exclusive
pairs is not considered an error: \fB-C\fR and \fB-l\fR (ell), \fB-m\fR and
\fB-l\fR (ell), \fB-x\fR and \fB-l\fR (ell), \fB-@\fR and \fB-l\fR (ell). The
\fB-l\fR option overrides the other option specified in each pair.
.sp
.LP
Specifying more than one of the options in the following mutually exclusive
groups is not considered an error: \fB-C\fR and \fB-1\fR (one), \fB-H\fR and
\fB-L\fR, \fB-c\fR and \fB-u\fR, and \fB-e\fR and \fB-E\fR, and \fB-t\fR and
\fB-S\fR. The last option specifying a specific timestamp (\fB-c\fR, \fB-u\fR,
\fB-% atime\fR , \fB-% crtime\fR, \fB-% ctime\fR, and \fB-% mtime\fR)
determines the timestamps used for sorting or in long format listings. The last
option \fB-t\fR, \fB-S\fR, or \fB-U\fR determines the sorting behavior.
.SS "/usr/xpg4/bin/ls"
.ne 2
.na
\fB\fB-F\fR\fR
.ad
.sp .6
.RS 4n
Marks directories with a trailing slash (\fB/\fR), doors with a trailing
greater-than sign (\fB>\fR), executable files with a trailing asterisk
(\fB*\fR), \fBFIFO\fRs with a trailing vertical bar (\fB|\fR), symbolic links
with a trailing "at" sign (\fB@\fR), and \fBAF_UNIX\fR address family sockets
with a trailing equals sign (\fB=\fR). Follows symlinks named as operands.
.RE

.sp
.ne 2
.na
\fB\fB--file-type\fR\fR
.ad
.sp .6
.RS 4n
Marks entries as with \fB-F\fR with the exception of executable files.
Executable files are not marked. Follows symlinks named as operands.
.RE

.sp
.LP
Specifying more than one of the options in the following groups of mutually
exclusive options is not considered an error: \fB-C\fR and \fB-l\fR (ell),
\fB-m\fR and \fB-l\fR (ell), \fB-x\fR and \fB-l\fR (ell), \fB-@\fR and \fB-l\fR
(ell), \fB-C\fR and \fB-1\fR (one), \fB-H\fR and \fB-L\fR, \fB-c\fR and
\fB-u\fR, \fB-e\fR and \fB-E\fR, \fB-t\fR and \fB-S\fR and \fB-U\fR. The last
option specifying a specific timestamp (\fB-c\fR, \fB-u\fR, \fB-% atime\fR ,
\fB-% crtime\fR, \fB-% ctime\fR, and \fB-% mtime\fR) determines the timestamps
used for sorting or in long format listings. The last \fB-t\fR, \fB-S\fR, or
\fB-U\fR option determines the sorting behavior.
.SS "/usr/xpg6/bin/ls"
.ne 2
.na
\fB\fB-F\fR\fR
.ad
.sp .6
.RS 4n
Marks directories with a trailing slash (\fB/\fR), doors with a trailing
greater-than sign (\fB>\fR), executable files with a trailing asterisk
(\fB*\fR), \fBFIFO\fRs with a trailing vertical bar (\fB|\fR), symbolic links
with a trailing "at" sign (\fB@\fR), and \fBAF_UNIX\fR address family sockets
with a trailing equals sign (\fB=\fR). Does not follow symlinks named as
operands unless the \fB-H\fR or \fB-L\fR option is specified.
.RE

.sp
.ne 2
.na
\fB\fB--file-type\fR\fR
.ad
.sp .6
.RS 4n
Marks entries as with \fB-F\fR with the exception of executable files.
Executable files are not marked. Does not follow symlinks named as operands
unless the \fB-H\fR or \fB-L\fR option is specified.
.RE

.sp
.LP
Specifying more than one of the options in the following mutually exclusive
pairs is not considered an error: \fB-C\fR and \fB-l\fR (ell), m and
\fB-l\fR(ell), \fB-x\fR and \fB-l\fR (ell), \fB-@\fR and \fB-l\fR (ell),
\fB-C\fR and \fB-1\fR (one), \fB-H\fR and -\fB-L\fR, \fB-c\fR and \fB-u\fR,
\fB-e\fR and \fB-E\fR, \fB-t\fR and \fB-S\fR and \fB-U\fR. The last option
specifying a specific timestamp (\fB-c\fR, \fB-u\fR, \fB-% atime\fR , \fB-%
crtime\fR, \fB-% ctime\fR, and \fB-% mtime\fR) determines the timestamps used
for sorting or in long format listings. The last \fB-t\fR, \fB-S\fR, or
\fB-U\fR option determines the sorting behavior.
.SH OPERANDS
The following operand is supported:
.sp
.ne 2
.na
\fB\fIfile\fR\fR
.ad
.sp .6
.RS 4n
A path name of a file to be written. If the file specified is not found, a
diagnostic message is output on standard error.
.RE

.SH USAGE
See \fBlargefile\fR(7) for the description of the behavior of \fBls\fR when
encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
.SH EXAMPLES
\fBExample 1 \fRViewing File Permissions
.sp
.LP
The following example shows how to display detailed information about a file.

.sp
.in +2
.nf
% ls -l file.1
-rw-r--r--   1 gozer    staff     206663 Mar 14 10:15 file.1
.fi
.in -2
.sp

.sp
.LP
The permissions string above (\fB-rw-r--r--\fR) describes that the file owner
has read and write permissions, the owning group has read permissions, and
others have read permissions.

.sp
.LP
The following example shows how to display detailed information about a
directory.

.sp
.in +2
.nf
% ls -ld test.dir
drwxr-xr-x   2 gozer    staff          2 Mar 14 10:17 test.dir
.fi
.in -2
.sp

.sp
.LP
The permissions string above (\fBdrwxr-xr-x\fR) describes that the directory
owner has read, write, and search permissions, the owning group has read and
search permissions, and others have read and search permissions.

.sp
.LP
Another example of listing file permissions is as follows:

.sp
.in +2
.nf
% ls -l file.2
-rw-rwl---   1 gozer    staff     206663 Mar 14 10:47 file.2
.fi
.in -2
.sp

.sp
.LP
The permissions string above (\fB-rw-rwl---\fR) describes that the file owner
has read and write permissions, the owning group has read and write
permissions, and the file can be locked during access.

.LP
\fBExample 2 \fRDisplaying ACL Information on Files and Directories
.sp
.LP
The following example shows how to display verbose ACL information on a ZFS
file.

.sp
.in +2
.nf
% ls -v file.1
-rw-r--r--   1 marks    staff     206663 Mar 14 10:15 file.1
     0:owner@:execute:deny
     1:owner@:read_data/write_data/append_data/write_xattr/write_attributes
          /write_acl/write_owner:allow
     2:group@:write_data/append_data/execute:deny
     3:group@:read_data:allow
     4:everyone@:write_data/append_data/write_xattr/execute/write_attributes
          /write_acl/write_owner:deny
     5:everyone@:read_data/read_xattr/read_attributes/read_acl/synchronize
          :allow
.fi
.in -2
.sp

.sp
.LP
The following example shows how to display compact ACL information on a ZFS
directory.

.sp
.in +2
.nf
% ls -dV test.dir
drwxr-xr-x   2 marks    staff          2 Mar 14 10:17 test.dir
            owner@:--------------:------:deny
            owner@:rwxp---A-W-Co-:------:allow
            group@:-w-p----------:------:deny
            group@:r-x-----------:------:allow
            everyone@:-w-p---A-W-Co-:------:deny
            everyone@:r-x---a-R-c--s:------:allow
.fi
.in -2
.sp

.sp
.LP
The following example illustrates the \fBls\fR \fB-v\fR behavior when listing
ACL  information on a UFS file.

.sp
.in +2
.nf
$ ls -v file.3
-rw-r--r--   1 root     root        2703 Mar 14 10:59 file.3
     0:user::rw-
     1:group::r--               #effective:r--
     2:mask:r--
     3:other:r--
.fi
.in -2
.sp

.LP
\fBExample 3 \fRPrinting the Names of All Files
.sp
.LP
The following example prints the names of all files in the current directory,
including those that begin with a dot (\fB\&.\fR), which normally do not print:

.sp
.in +2
.nf
example% \fBls -a\fR
.fi
.in -2
.sp

.LP
\fBExample 4 \fRProviding File Information
.sp
.LP
The following example provides file information:

.sp
.in +2
.nf
example% ls -aisn
.fi
.in -2
.sp

.sp
.LP
This command provides information on \fBa\fRll files, including those that
begin with a dot (\fBa\fR), the \fBi\fR-number, the memory address of the
i-node associated with the file\(emprinted in the left-hand column (\fBi\fR);
the \fBs\fRize (in blocks) of the files, printed in the column to the right of
the i-numbers (\fBs\fR); finally, the report is displayed in the \fBn\fRumeric
version of the long list, printing the \fBUID\fR (instead of user name) and
\fBGID\fR (instead of group name) numbers associated with the files.

.sp
.LP
When the sizes of the files in a directory are listed, a total count of blocks,
including indirect blocks, is printed.

.LP
\fBExample 5 \fRProviding Extended System Attributes Information
.sp
.in +2
.nf
example% ls -/ c file    (extended system attribute in compact mode)
-rw-r--r--   1 root     root           0 May 10 14:17 file
                         {AHRSadim-u--}
.fi
.in -2
.sp

.sp
.LP
In this example, \fBav_quarantined\fR, \fBoffline\fR, and \fBsparse\fR
are not set.
.sp
.in +2
.nf
example% ls -/ v file (extended system attribute in verbose mode)
-rw-r--r--   1 root     root           0 May 10 14:17 file
		{archive,hidden,readonly,system,\e
		 appendonly,nodump,immutable,av_modified,\e
		 noav_quarantined,nounlink,nooffline,\e
		 nosparse}

example% ls -/ v file     (no extended system attribute)
-rw-r--r--  1 root    staff        0 May 16 14:48 file
               {}

example% ls -/ c file        (extended system attribute
                              supported file system)

-rw-r--r--  1 root staff        3 Jun  4 22:04 file
               {A------m----}
.fi
.in -2
.sp

.sp
.LP
\fBarchive\fR and \fBav_modified\fR attributes are set by default on  an
extended system attribute supported file.
.sp
.in +2
.nf
example% ls -/ c  -%crtime file

-rw-r--r--    root     root          0 May 10 14:17 file
               {AHRSadim-u--}
.fi
.in -2
.sp

.sp
.LP
This example displays the timestamp as the creation time:
.sp
.in +2
.nf
example% ls -l -%all file
-rw-r--r--   1 root     root           0 May 10 14:17    file
                timestamp: atime    Jun 14 08:47:37 2007
                timestamp: ctime    May 10 14:20:23 2007
                timestamp: mtime    May 10 14:17:56 2007
                timestamp: crtime   May 10 14:17:56 2007

example% ls -%crtime -tl file*

-rw-r--r--   1 foo      staff          3 Jun  4 22:04 file1
-rw-r--r--   1 root     root           0 May 10 14:17 file
-rw-r--r--   1 foo      staff          0 May  9 13:49 file.1
.fi
.in -2
.sp

.sp
.LP
In this example the files are sorted by creation time.
.SH ENVIRONMENT VARIABLES
See \fBenviron\fR(7) for descriptions of the following environment variables
that affect the execution of \fBls\fR: \fBLANG\fR, \fBLC_ALL\fR,
\fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR,
\fBNLSPATH\fR, and \fBTZ\fR.
.sp
.ne 2
.na
\fB\fBCOLUMNS\fR\fR
.ad
.sp .6
.RS 4n
Determines the user's preferred column position width for writing multiple
text-column output. If this variable contains a string representing a decimal
integer, the \fBls\fR utility calculates how many path name text columns to
write (see \fB-C\fR) based on the width provided. If \fBCOLUMNS\fR is not set
or is invalid, 80 is used. The column width chosen to write the names of files
in any given directory is constant. File names are not be truncated to fit into
the multiple text-column output.
.RE

.sp
.ne 2
.na
\fB\fBLS_COLORS\fR\fR
.ad
.sp .6
.RS 4n
Determines the coloring scheme used when displaying color output. If not set
and color output is specified, a default scheme is used. If TERM is not set, no
color output is used.
.RE

.sp
.ne 2
.na
\fB\fBTERM\fR\fR
.ad
.sp .6
.RS 4n
Determine the terminal type. If this variable is unset or NULL, no color output
is generated regardless of the value of the --color option.
.RE

.SH EXIT STATUS
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
All information was written successfully.
.RE

.sp
.ne 2
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
An error occurred.
.RE

.SH FILES
.ne 2
.na
\fB\fB/etc/group\fR\fR
.ad
.sp .6
.RS 4n
group IDs for \fBls\fR \fB-l\fR and \fBls\fR \fB-g\fR
.RE

.sp
.ne 2
.na
\fB\fB/etc/passwd\fR\fR
.ad
.sp .6
.RS 4n
user IDs for \fBls\fR \fB-l\fR and \fBls\fR \fB-o\fR
.RE

.sp
.ne 2
.na
\fB\fB/usr/share/lib/terminfo/?/*\fR\fR
.ad
.sp .6
.RS 4n
terminal information database
.RE

.SH ATTRIBUTES
See \fBattributes\fR(7) for descriptions of the following attributes:
.SS "/usr/bin/ls"

.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
CSI	Enabled
_
Interface Stability	Committed
_
Standard	See below.
.TE

.sp
.LP
For all options except \fB-A\fR, \fB-b\fR, \fB-e\fR, \fB-E,\fR \fB-h\fR,
\fB-S\fR, U \fB-v\fR, \fB-V\fR, \fB-@\fR, \fB-/\fR, \fB-%\fR, \fB--all\fR,
\fB--almost-all\fR, \fB--block-size\fR, \fB--classify\fR, \fB--color\fR,
\fB--colour\fR, \fB--dereference\fR, \fB--dereference-command-line\fR,
\fB--escape\fR, \fB--file-type\fR, \fB--full-time\fR, \fB--human-readable\fR,
\fB--ignore-backups\fR, \fB--inode\fR, \fB--no-group\fR,
\fB--numeric-uid-gid\fR, \fB--reverse\fR, \fB--recursive\fR, \fB--si\fR,
\fB--size\fR, and \fB--time-style\fR, see \fBstandards\fR(7).
.SS "/usr/xpg4/bin/ls"

.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
CSI	Enabled
_
Interface Stability	Committed
_
Standard	See below.
.TE

.sp
.LP
For all options except \fB-A\fR, \fB-b\fR, \fB-e\fR, \fB-E,\fR \fB-h\fR,
\fB-S\fR, U \fB-v\fR, \fB-V\fR, \fB-@\fR, \fB-/\fR, \fB-%\fR, \fB--all\fR,
\fB--almost-all\fR, \fB--block-size\fR, \fB--classify\fR, \fB--color\fR,
\fB--colour\fR, \fB--dereference\fR, \fB--dereference-command-line\fR,
\fB--escape\fR, \fB--file-type\fR, \fB--full-time\fR, \fB--human-readable\fR,
\fB--ignore-backups\fR, \fB--inode\fR, \fB--no-group\fR,
\fB--numeric-uid-gid\fR, \fB--reverse\fR, \fB--recursive\fR, \fB--si\fR,
\fB--size\fR, and \fB--time-style\fR, see \fBstandards\fR(7).
.SS "/usr/xpg6/bin/ls"

.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
CSI	Enabled
_
Interface Stability	Committed
_
Standard	See below.
.TE

.sp
.LP
For all options except \fB-A\fR, \fB-b\fR, \fB-e\fR, \fB-E,\fR \fB-h\fR,
\fB-S\fR, U \fB-v\fR, \fB-V\fR, \fB-@\fR, \fB-/\fR, \fB-%\fR, \fB--all\fR,
\fB--almost-all\fR, \fB--block-size\fR, \fB--classify\fR, \fB--color\fR,
\fB--colour\fR, \fB--dereference\fR, \fB--dereference-command-line\fR,
\fB--escape\fR, \fB--file-type\fR, \fB--full-time\fR, \fB--human-readable\fR,
\fB--ignore-backups\fR, \fB--inode\fR, \fB--no-group\fR,
\fB--numeric-uid-gid\fR, \fB--reverse\fR, \fB--recursive\fR, \fB--si\fR,
\fB--size\fR, and \fB--time-style\fR, see \fBstandards\fR(7).
.SH SEE ALSO
.BR chmod (1),
.BR cp (1),
.BR setfacl (1),
.BR fgetattr (3C),
.BR strftime (3C),
.BR terminfo (5),
.BR acl (7),
.BR attributes (7),
.BR environ (7),
.BR fsattr (7),
.BR largefile (7),
.BR standards (7)
.SH NOTES
Unprintable characters in file names can confuse the columnar output options.
.sp
.LP
The total block count is incorrect if there are hard links among the files.
.sp
.LP
The sort order of \fBls\fR output is affected by the locale and can be
overridden by the \fBLC_COLLATE\fR environment variable. For example, if
\fBLC_COLLATE\fR equals \fBC\fR, dot files appear first, followed by names
beginning with upper-case letters, then followed by names beginning with
lower-case letters. But if \fBLC_COLLATE\fR equals \fBen_US.ISO8859-1\fR, then
leading dots as well as case are ignored in determining the sort order.