4228 chmod(1): SFI NFSv4 ACL inheritance flags are not documented
[illumos-gate.git] / usr / src / man / man1 / ls.1
blob9f35b76a6235c0f54801eb11e82cb1e32689eaae
1 '\" te
2 .\" Copyright 2014 Nexenta Systems, Inc.  All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" Copyright (c) 2009, Sun Microsystems, Inc. All Rights Reserved
5 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved
6 .\" 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/.
7 .\" 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
8 .\" are reprinted and reproduced in electronic form in the Sun OS 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
9 .\" 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.
10 .\"  This notice shall appear on any product containing this material.
11 .\" 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.
12 .\"  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
13 .\" fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
14 .TH LS 1 "Nov 24, 2014"
15 .SH NAME
16 ls \- list contents of directory
17 .SH SYNOPSIS
18 .LP
19 .nf
20 \fB/usr/bin/ls\fR [\fB-aAbcCdeEfFghHiklLmnopqrRsStuUwvVx1@\fR]
21      [\fB-/ c\fR | \fBv\fR] [\fB-% atime | crtime | ctime | mtime | all\fR]
22      [--block-size size] [--color[=\fIwhen\fR]] [--file-type]
23      [--si] [--time-style \fIstyle\fR] [\fIfile\fR]...
24 .fi
26 .LP
27 .nf
28 \fB/usr/xpg4/bin/ls\fR [\fB-aAbcCdeEfFghHiklLmnopqrRsStuUwvVx1@\fR]
29      [\fB-/ c\fR | \fBv\fR] [\fB-% atime | crtime | ctime | mtime | all\fR]
30      [--block-size size] [--color[=\fIwhen\fR]] [--file-type]
31      [--si] [--time-style \fIstyle\fR] [\fIfile\fR]...
32 .fi
34 .LP
35 .nf
36 \fB/usr/xpg6/bin/ls\fR [\fB-aAbcCdeEfFghHiklLmnopqrRsStuUwvVx1@\fR]
37      [\fB-/ c\fR | \fBv\fR] [\fB-% atime | crtime | ctime | mtime | all\fR]
38      [--block-size size] [--color[=\fIwhen\fR]] [--file-type]
39      [--si] [--time-style \fIstyle\fR] [\fIfile\fR]...
40 .fi
42 .SH DESCRIPTION
43 .LP
44 For each \fIfile\fR that is a directory, \fBls\fR lists the contents of the
45 directory. For each \fIfile\fR that is an ordinary file, \fBls\fR repeats its
46 name and any other information requested. The output is sorted alphabetically
47 by default. When no argument is given, the current directory (\fB\&.\fR) is
48 listed. When several arguments are given, the arguments are first sorted
49 appropriately, but file arguments appear before directories and their contents.
50 .sp
51 .LP
52 There are three major listing formats. The default format for output directed
53 to a terminal is multi\(micolumn with entries sorted down the columns. The
54 \fB-1\fR option allows single column output and \fB-m\fR enables stream output
55 format. In order to determine output formats for the \fB-C\fR, \fB-x\fR, and
56 \fB-m\fR options, \fBls\fR uses an environment variable, \fBCOLUMNS\fR, to
57 determine the number of character positions available on one output line. If
58 this variable is not set, the \fBterminfo\fR(4) database is used to determine
59 the number of columns, based on the environment variable, \fBTERM\fR. If this
60 information cannot be obtained, 80 columns are assumed. If the \fB-w\fR option
61 is used, the argument overrides any other column width.
62 .sp
63 .LP
64 The mode printed when the \fB-e\fR, \fB-E\fR, \fB-g\fR, \fB-l\fR, \fB-n\fR,
65 \fB-o\fR, \fB-v\fR, \fB-V\fR, or \fB-@\fR option is in effect consists of
66 eleven characters. The first character can be one of the following:
67 .sp
68 .ne 2
69 .na
70 \fB\fBd\fR\fR
71 .ad
72 .sp .6
73 .RS 4n
74 The entry is a directory.
75 .RE
77 .sp
78 .ne 2
79 .na
80 \fB\fBD\fR\fR
81 .ad
82 .sp .6
83 .RS 4n
84 The entry is a door.
85 .RE
87 .sp
88 .ne 2
89 .na
90 \fB\fBl\fR\fR
91 .ad
92 .sp .6
93 .RS 4n
94 The entry is a symbolic link.
95 .RE
97 .sp
98 .ne 2
99 .na
100 \fB\fBb\fR\fR
102 .sp .6
103 .RS 4n
104 The entry is a block special file.
108 .ne 2
110 \fB\fBc\fR\fR
112 .sp .6
113 .RS 4n
114 The entry is a character special file.
118 .ne 2
120 \fB\fBp\fR\fR
122 .sp .6
123 .RS 4n
124 The entry is a \fBFIFO\fR (or "named pipe") special file.
128 .ne 2
130 \fB\fBP\fR\fR
132 .sp .6
133 .RS 4n
134 The entry is an event port.
138 .ne 2
140 \fB\fBs\fR\fR
142 .sp .6
143 .RS 4n
144 The entry is an \fBAF_UNIX\fR address family socket.
148 .ne 2
150 \fB\fB\(mi\fR\fR
152 .sp .6
153 .RS 4n
154 The entry is an ordinary file.
159 The next 9 characters are interpreted as three sets of three bits each. The
160 first set refers to the owner's permissions; the next to permissions of others
161 in the user-group of the file; and the last to all others. Within each set, the
162 three characters indicate permission to read, to write, and to execute the file
163 as a program, respectively. For a directory, \fBexecute\fR permission is
164 interpreted to mean permission to search the directory for a specified file.
165 The character after permissions is an ACL or extended attributes indicator.
166 This character is an \fB@\fR if extended attributes are associated with the
167 file and the \fB-@\fR option is in effect. Otherwise, this character is a plus
168 sign (\fB+\fR) character if a non-trivial ACL is associated with the file or a
169 space character if not.
172 If \fB-/\fR and/or \fB-%\fR are in effect, then the extended system attributes
173 are printed when filesystem supports extended system attributes. The display
174 looks as follows:
176 .in +2
178 $ls -/ c  file
179 -rw-r--r--   1 root     root           0 May 10 14:17 file
180                 {AHRSadim-u--}
182 $ls -/ v file
183 -rw-r--r--   1 root     root           0 May 10 14:17 file
184                 {archive,hidden,readonly,system,\e
185                  appendonly,nodump,immutable,av_modified,\e
186                  noav_quarantined,nounlink,nooffline,\e
187                  nosparse}
189 $ls -l -% all file
190 -rw-r--r--   1 root     root           0 May 10 14:17 file
191                 timestamp: atime    Jun 25 12:56:44 2007
192                 timestamp: ctime    May 10 14:20:23 2007
193                 timestamp: mtime    May 10 14:17:56 2007
194                 timestamp: crtime   May 10 14:17:56 2007
196 .in -2
201 See the option descriptions of the \fB-/\fR and \fB-%\fR option for details.
204 \fBls\fR \fB-l\fR (the long list) prints its output as follows for the POSIX
205 locale:
207 .in +2
209 -rwxrwxrwx+ 1 smith dev   10876  May 16 9:42 part2
211 .in -2
216 Reading from right to left, you see that the current directory holds one file,
217 named \fBpart2\fR. Next, the last time that file's contents were modified was
218 \fB9:42 A.M.\fR on \fBMay 16\fR. The file contains 10,876 characters, or bytes.
219 The owner of the file, or the user, belongs to the group \fBdev\fR (perhaps
220 indicating \fBdevelopment\fR), and his or her login name is \fBsmith\fR. The
221 number, in this case \fB1\fR, indicates the number of links to file \fBpart2\fR
222 (see \fBcp\fR(1)). The plus sign indicates that there is an \fBACL\fR
223 associated with the file. If the \fB-@\fR option has been specified, the
224 presence of extended attributes supersede the presence of an \fBACL\fR and the
225 plus sign is replaced with an 'at' sign (\fB@\fR). Finally, the dash and
226 letters tell you that user, group, and others have permissions to read, write,
227 and execute \fBpart2\fR.
230 The execute (\fBx\fR) symbol occupies the third position of the three-character
231 sequence. A \fB\(mi\fR in the third position would have indicated a denial of
232 execution permissions.
235 The permissions are indicated as follows:
237 .ne 2
239 \fB\fBr\fR\fR
241 .sp .6
242 .RS 4n
243 The file is readable.
247 .ne 2
249 \fB\fBw\fR\fR
251 .sp .6
252 .RS 4n
253 The file is writable.
257 .ne 2
259 \fB\fBx\fR\fR
261 .sp .6
262 .RS 4n
263 The file is executable.
267 .ne 2
269 \fB\fB\(mi\fR\fR
271 .sp .6
272 .RS 4n
273 The indicated permission is \fInot\fR granted.
277 .ne 2
279 \fB\fBs\fR\fR
281 .sp .6
282 .RS 4n
283 The \fBs\fRet-user-ID or \fBs\fRet-group-ID bit is on, and the corresponding
284 user or group execution bit is also on.
288 .ne 2
290 \fB\fBS\fR\fR
292 .sp .6
293 .RS 4n
294 Undefined bit-state (the set-user-ID or set-group-id bit is on and the user or
295 group execution bit is off). For group permissions, this applies only to
296 non-regular files.
300 .ne 2
302 \fB\fBt\fR\fR
304 .sp .6
305 .RS 4n
306 The 1000 (octal) bit, or sticky bit, is on (see \fBchmod\fR(1)), and execution
307 is on.
311 .ne 2
313 \fB\fBT\fR\fR
315 .sp .6
316 .RS 4n
317 The 1000 bit is turned on, and execution is off (undefined bit-state).
320 .SS "/usr/bin/ls"
321 .ne 2
323 \fB\fBl\fR\fR
325 .sp .6
326 .RS 4n
327 Mandatory locking occurs during access (on a regular file, the set-group-ID bit
328 is on and the group execution bit is off).
331 .SS "/usr/xpg4/bin/ls and /usr/xpg6/bin/ls"
332 .ne 2
334 \fB\fBL\fR\fR
336 .sp .6
337 .RS 4n
338 Mandatory locking occurs during access (on a regular file, the set-group-ID bit
339 is on and the group execution bit is off).
344 For user and group permissions, the third position is sometimes occupied by a
345 character other than \fBx\fR or \fB-\fR. \fBs\fR or \fBS\fR also can occupy
346 this position, referring to the state of the set-ID bit, whether it be the
347 user's or the group's. The ability to assume the same ID as the user during
348 execution is, for example, used during login when you begin as root but need to
349 assume the identity of the user you login as.
352 In the case of the sequence of group permissions, \fBl\fR can occupy the third
353 position. \fBl\fR refers to mandatory file and record locking. This permission
354 describes a file's ability to allow other files to lock its reading or writing
355 permissions during access.
358 For others permissions, the third position can be occupied by \fBt\fR or
359 \fBT\fR. These refer to the state of the sticky bit and execution permissions.
360 .SS "Color Output"
362 If color output is enabled, the environment variable LS_COLORS is checked.  If
363 it exists, it's contents are used to control the colors used to display
364 filenames.  If it is not set, a default list of colors is used. The format of
365 LS_COLORS is a colon separated list of attribute specifications. Each attribute
366 specification is of the format
368 .in +2
370 \fIfilespec\fR=\fIattr\fR[;\fIattr\fR..]
372 .in -2
377 \fIfilespec\fR is either of the form \fI*.SUFFIX\fR, for example, \fB*.jar\fR
378 or \fB*.Z\fR, or one of the following file types:
380 .ne 2
382 \fB\fBno\fR\fR
384 .sp .6
385 .RS 4n
386 Normal file
390 .ne 2
392 \fB\fBfi\fR\fR
394 .sp .6
395 .RS 4n
396 Regular file
400 .ne 2
402 \fB\fBdi\fR\fR
404 .sp .6
405 .RS 4n
406 Directory
410 .ne 2
412 \fB\fBln\fR\fR
414 .sp .6
415 .RS 4n
416 Symbolic link
420 .ne 2
422 \fB\fBpi\fR\fR
424 .sp .6
425 .RS 4n
426 FIFO or named pipe
430 .ne 2
432 \fB\fBso\fR\fR
434 .sp .6
435 .RS 4n
436 Socket
440 .ne 2
442 \fB\fBdo\fR\fR
444 .sp .6
445 .RS 4n
446 Door file
450 .ne 2
452 \fB\fBbd\fR\fR
454 .sp .6
455 .RS 4n
456 Block device
460 .ne 2
462 \fB\fBcd\fR\fR
464 .sp .6
465 .RS 4n
466 Character device
470 .ne 2
472 \fB\fBex\fR\fR
474 .sp .6
475 .RS 4n
476 Execute bit (either \fBuser\fR, \fBgroup\fR, or \fBother\fR) set
480 .ne 2
482 \fB\fBpo\fR\fR
484 .sp .6
485 .RS 4n
486 Event port
490 .ne 2
492 \fB\fBst\fR\fR
494 .sp .6
495 .RS 4n
496 Sticky bit set
500 .ne 2
502 \fB\fBor\fR\fR
504 .sp .6
505 .RS 4n
506 Orphaned symlink
510 .ne 2
512 \fB\fBsg\fR\fR
514 .sp .6
515 .RS 4n
516 \fBsetgid\fR binary
520 .ne 2
522 \fB\fBsu\fR\fR
524 .sp .6
525 .RS 4n
526 \fBsetuid\fR binary
530 .ne 2
532 \fB\fBow\fR\fR
534 .sp .6
535 .RS 4n
536 \fBworld\fR writable
540 .ne 2
542 \fB\fBtw\fR\fR
544 .sp .6
545 .RS 4n
546 Sticky bit and \fBworld\fR writable
551 \fIattr\fR is a semicolon delimited list of color and display attributes which
552 are combined to determine the final output color. Any combination of \fIattr\fR
553 values can be specified. Possible \fIattr\fR values are:
555 .ne 2
557 \fB\fB00\fR\fR
559 .sp .6
560 .RS 4n
561 All attributes off (default terminal color)
565 .ne 2
567 \fB\fB01\fR\fR
569 .sp .6
570 .RS 4n
571 Display text in bold
575 .ne 2
577 \fB\fB04\fR\fR
579 .sp .6
580 .RS 4n
581 Display text with an underscore
585 .ne 2
587 \fB\fB05\fR\fR
589 .sp .6
590 .RS 4n
591 Display text in bold
595 .ne 2
597 \fB\fB07\fR\fR
599 .sp .6
600 .RS 4n
601 Display text with foreground and background colors reversed
605 .ne 2
607 \fB\fB08\fR\fR
609 .sp .6
610 .RS 4n
611 Display using concealed text.
616 One of the following values can be chosen. If multiple values are specified,
617 the last specified value is used.
619 .ne 2
621 \fB\fB30\fR\fR
623 .sp .6
624 .RS 4n
625 Set foreground to \fBblack\fR.
629 .ne 2
631 \fB\fB31\fR\fR
633 .sp .6
634 .RS 4n
635 Set foreground to \fBred\fR.
639 .ne 2
641 \fB\fB32\fR\fR
643 .sp .6
644 .RS 4n
645 Set foreground to \fBgreen\fR.
649 .ne 2
651 \fB\fB33\fR\fR
653 .sp .6
654 .RS 4n
655 Set foreground to \fByellow\fR.
659 .ne 2
661 \fB\fB34\fR\fR
663 .sp .6
664 .RS 4n
665 Set foreground to \fBblue\fR.
669 .ne 2
671 \fB\fB35\fR\fR
673 .sp .6
674 .RS 4n
675 Set foreground to \fBmagenta\fR (\fBpurple\fR).
677 Set foreground to \fB\fR.
681 .ne 2
683 \fB\fB36\fR\fR
685 .sp .6
686 .RS 4n
687 Set foreground to \fBcyan\fR.
691 .ne 2
693 \fB\fB37\fR\fR
695 .sp .6
696 .RS 4n
697 Set foreground to \fBwhite\fR.
701 .ne 2
703 \fB\fB39\fR\fR
705 .sp .6
706 .RS 4n
707 Set foreground to default terminal color.
712 One of the following can be specified. If multiple values are specified, the
713 last value specified is used.
715 .ne 2
717 \fB\fB40\fR\fR
719 .sp .6
720 .RS 4n
721 Set foreground to \fBblack\fR.
725 .ne 2
727 \fB\fB41\fR\fR
729 .sp .6
730 .RS 4n
731 Set foreground to \fBred\fR.
735 .ne 2
737 \fB\fB42\fR\fR
739 .sp .6
740 .RS 4n
741 Set foreground to \fBgreen\fR.
745 .ne 2
747 \fB\fB43\fR\fR
749 .sp .6
750 .RS 4n
751 Set foreground to \fByellow\fR.
755 .ne 2
757 \fB\fB44\fR\fR
759 .sp .6
760 .RS 4n
761 Set foreground to \fBblue\fR.
765 .ne 2
767 \fB\fB45\fR\fR
769 .sp .6
770 .RS 4n
771 Set foreground to \fBmagenta\fR (\fBpurple\fR).
775 .ne 2
777 \fB\fB46\fR\fR
779 .sp .6
780 .RS 4n
781 Set foreground to \fBcyan\fR.
785 .ne 2
787 \fB\fB47\fR\fR
789 .sp .6
790 .RS 4n
791 Set foreground to \fBwhite\fR.
795 .ne 2
797 \fB\fB49\fR\fR
799 .sp .6
800 .RS 4n
801 Set foreground to default terminal color.
806 On some terminals, setting the bold attribute causes the foreground colors to
807 be high-intensity, that is, brighter. In such cases the low-intensity yellow is
808 often displayed as a brown or orange color.
811 At least one attribute must be listed for a file specification.
814 The appropriate color codes are chosen by selecting the most specific match,
815 starting with the file suffixes and proceeding with the file types until a
816 match is found. The \fBno\fR (normal file) type matches any file.
817 .SH OPTIONS
819 The following options are supported:
820 .SS "/usr/bin/ls, /usr/xpg4/bin/ls, and /usr/xpg6/bin/ls"
822 The following options are supported for all three versions:
824 .ne 2
826 \fB\fB-a\fR\fR
830 \fB\fB--all\fR\fR
832 .sp .6
833 .RS 4n
834 Lists all entries, including those that begin with a dot (\fB\&.\fR), which are
835 normally not listed.
839 .ne 2
841 \fB\fB-A\fR\fR
845 \fB\fB--almost-all\fR\fR
847 .sp .6
848 .RS 4n
849 Lists all entries, including those that begin with a dot (\fB\&.\fR), with the
850 exception of the working directory (\fB\&.\fR) and the parent directory
851 (\fB\&..\fR).
855 .ne 2
857 \fB\fB-b\fR\fR
861 \fB\fB--escape\fR\fR
863 .sp .6
864 .RS 4n
865 Forces printing of non-printable characters to be in the octal
866 \fB\e\fR\fIddd\fR notation.
870 .ne 2
872 \fB\fB-B\fR\fR
876 \fB\fB--ignore-backups\fR\fR
878 .sp .6
879 .RS 4n
880 Do not display any files ending with a tilde (\fB~\fR).
884 .ne 2
886 \fB\fB-c\fR\fR
888 .sp .6
889 .RS 4n
890 Uses time of last modification of the i-node (file created, mode changed, and
891 so forth) for sorting (\fB-t\fR) or printing (\fB-l\fR or \fB-n\fR).
895 .ne 2
897 \fB\fB-C\fR\fR
899 .sp .6
900 .RS 4n
901 Multi-column output with entries sorted down the columns. This is the default
902 output format.
906 .ne 2
908 \fB\fB-d\fR\fR
910 .sp .6
911 .RS 4n
912 If an argument is a directory, lists only its name (not its contents). Often
913 used with \fB-l\fR to get the status of a directory.
917 .ne 2
919 \fB\fB-e\fR\fR
921 .sp .6
922 .RS 4n
923 The same as \fB-l\fR, except displays time to the second, and with one format
924 for all files regardless of age: \fImmm dd hh:mm:ss yyyy\fR.
928 .ne 2
930 \fB\fB-E\fR\fR
932 .sp .6
933 .RS 4n
934 The same as \fB-l\fR, except displays time to the nanosecond and with one
935 format for all files regardless of age: \fIyyyy-mm-dd hh:mm:ss.nnnnnnnnn\fR
936 (ISO 8601:2000 format).
938 In addition, this option displays the offset from UTC in ISO 8601:2000 standard
939 format (+\fIhhmm\fR or -\fIhhmm\fR) or no characters if the offset is
940 indeterminable. The offset reflects the appropriate standard or alternate
941 offset in force at the file's displayed date and time, under the current
942 timezone.
946 .ne 2
948 \fB\fB-f\fR\fR
950 .sp .6
951 .RS 4n
952 Forces each argument to be interpreted as a directory and list the name found
953 in each slot. This option turns off \fB-l\fR, \fB-t\fR, \fB-s\fR, \fB-S\fR, and
954 \fB-r\fR, and turns on \fB-a\fR. The order is the order in which entries appear
955 in the directory.
959 .ne 2
961 \fB\fB-F\fR\fR
965 \fB\fB--classify\fR\fR
967 .sp .6
968 .RS 4n
969 Append a symbol after certain types of files to indicate the file type. The
970 following symbols are used:
972 .ne 2
974 \fB\fB/\fR\fR
976 .sp .6
977 .RS 4n
978 Directory
982 .ne 2
984 \fB\fB>\fR\fR
986 .sp .6
987 .RS 4n
988 Door file
992 .ne 2
994 \fB\fB|\fR\fR
996 .sp .6
997 .RS 4n
998 Named pipe (\fBFIFO\fR)
1002 .ne 2
1004 \fB\fB@\fR\fR
1006 .sp .6
1007 .RS 4n
1008 Symbolic link
1012 .ne 2
1014 \fB\fB=\fR\fR
1016 .sp .6
1017 .RS 4n
1018 Socket
1022 .ne 2
1024 \fB\fB*\fR\fR
1026 .sp .6
1027 .RS 4n
1028 Executable
1034 .ne 2
1036 \fB\fB-g\fR\fR
1038 .sp .6
1039 .RS 4n
1040 The same as \fB-l\fR, except that the owner is not printed.
1044 .ne 2
1046 \fB\fB-h\fR\fR
1050 \fB\fB--human-readable\fR\fR
1052 .sp .6
1053 .RS 4n
1054 All sizes are scaled to a human readable format, for example, \fB14K\fR,
1055 \fB234M\fR, \fB2.7G\fR, or \fB3.0T\fR. Scaling is done by repetitively dividing
1056 by \fB1024\fR. The last --si or -h option determines the divisor used.
1060 .ne 2
1062 \fB\fB-H\fR\fR
1066 \fB\fB--dereference-command-line\fR\fR
1068 .sp .6
1069 .RS 4n
1070 If an argument is a symbolic link that references a directory, this option
1071 evaluates the file information and file type of the directory that the link
1072 references, rather than those of the link itself. However, the name of the link
1073 is displayed, rather than the referenced directory.
1077 .ne 2
1079 \fB\fB-i\fR\fR
1083 \fB\fB--inode\fR\fR
1085 .sp .6
1086 .RS 4n
1087 For each file, prints the i-node number in the first column of the report.
1091 .ne 2
1093 \fB\fB-k\fR\fR
1095 .sp .6
1096 .RS 4n
1097 All sizes are printed in kbytes. Equivalent to --block-size=1024.
1101 .ne 2
1103 \fB\fB-l\fR\fR
1105 .sp .6
1106 .RS 4n
1107 Lists in long format, giving mode, \fBACL\fR indication, number of links,
1108 owner, group, size in bytes, and time of last modification for each file (see
1109 above). If the file is a special file, the size field instead contains the
1110 major and minor device numbers. If the time of last modification is greater
1111 than six months ago, it is shown in the format `month date year' for the POSIX
1112 locale. When the \fBLC_TIME\fR locale category is not set to the POSIX locale,
1113 a different format of the time field can be used. Files modified within six
1114 months show `month date time'. If the file is a symbolic link, the filename is
1115 printed followed by "\fB\(->\fR" and the path name of the referenced file.
1119 .ne 2
1121 \fB\fB-L\fR\fR
1125 \fB\fB--dereference\fR\fR
1127 .sp .6
1128 .RS 4n
1129 If an argument is a symbolic link, this option evaluates the file information
1130 and file type of the file or directory that the link references, rather than
1131 those of the link itself. However, the name of the link is displayed, rather
1132 than the referenced file or directory.
1136 .ne 2
1138 \fB\fB-m\fR\fR
1140 .sp .6
1141 .RS 4n
1142 Streams output format. Files are listed across the page, separated by commas.
1146 .ne 2
1148 \fB\fB-n\fR\fR
1152 \fB\fB--numeric-uid-gid\fR\fR
1154 .sp .6
1155 .RS 4n
1156 The same as \fB-l\fR, except that the owner's \fBUID\fR and group's \fBGID\fR
1157 numbers are printed, rather than the associated character strings.
1161 .ne 2
1163 \fB\fB-o\fR\fR
1167 \fB\fB--no-group\fR\fR
1169 .sp .6
1170 .RS 4n
1171 The same as \fB-l\fR, except that the group is not printed.
1175 .ne 2
1177 \fB\fB-p\fR\fR
1179 .sp .6
1180 .RS 4n
1181 Puts a slash (\fB/\fR) after each filename if the file is a directory.
1185 .ne 2
1187 \fB\fB-q\fR\fR
1191 \fB\fB--hide-control-chars\fR\fR
1193 .sp .6
1194 .RS 4n
1195 Forces printing of non-printable characters in file names as the character
1196 question mark (\fB?\fR).
1200 .ne 2
1202 \fB\fB-r\fR\fR
1206 \fB\fB--reverse\fR\fR
1208 .sp .6
1209 .RS 4n
1210 Reverses the order of sort to get reverse alphabetic, oldest first, or smallest
1211 file size first as appropriate.
1215 .ne 2
1217 \fB\fB-R\fR\fR
1221 \fB\fB--recursive\fR\fR
1223 .sp .6
1224 .RS 4n
1225 Recursively lists subdirectories encountered.
1229 .ne 2
1231 \fB\fB-s\fR\fR
1235 \fB\fB--size\fR\fR
1237 .sp .6
1238 .RS 4n
1239 Indicate the total number of file system blocks consumed by each file
1240 displayed.
1244 .ne 2
1246 \fB\fB-S\fR\fR
1248 .sp .6
1249 .RS 4n
1250 Sort by file size (in decreasing order) and for files with the same size by
1251 file name (in increasing alphabetic order) instead of just by name.
1255 .ne 2
1257 \fB\fB-t\fR\fR
1259 .sp .6
1260 .RS 4n
1261 Sorts by time stamp (latest first) instead of by name. The default is the last
1262 modification time. See \fB-c\fR, \fB-u\fR and \fB-%\fR.
1266 .ne 2
1268 \fB\fB-u\fR\fR
1270 .sp .6
1271 .RS 4n
1272 Uses time of last access instead of last modification for sorting (with the
1273 \fB-t\fR option) or printing (with the \fB-l\fR option).
1277 .ne 2
1279 \fB\fB-U\fR\fR
1281 .sp .6
1282 .RS 4n
1283 Output is unsorted.
1287 .ne 2
1289 \fB\fB-v\fR\fR
1291 .sp .6
1292 .RS 4n
1293 The same as \fB-l\fR, except that verbose ACL information is displayed as well
1294 as the \fB-l\fR output. ACL information is displayed even if the file or
1295 directory doesn't have an ACL.
1299 .ne 2
1301 \fB\fB-V\fR\fR
1303 .sp .6
1304 .RS 4n
1305 The same as \fB-l\fR, except that compact ACL information is displayed after
1306 the \fB-l\fR output.
1308 The \fB-V\fR option is only applicable to file systems that support NFSv4 ACLs,
1309 such as the Solaris ZFS file system.
1311 The format of the displayed ACL is as follows:
1313 .in +2
1315 \fIentry_type\fR : \fIpermissions\fR : \fIinheritance_flags\fR : \fIaccess_type\fR
1317 .in -2
1320 \fIentry_type\fR is displayed as one of the following:
1322 .ne 2
1324 \fBuser:\fIusername\fR\fR
1326 .sp .6
1327 .RS 4n
1328 Additional user access for \fIusername\fR.
1332 .ne 2
1334 \fBgroup:\fIgroupname\fR\fR
1336 .sp .6
1337 .RS 4n
1338 Additional group access for group \fIgroupname\fR.
1342 .ne 2
1344 \fBowner@\fR
1346 .sp .6
1347 .RS 4n
1348 File owner.
1352 .ne 2
1354 \fBgroup@\fR
1356 .sp .6
1357 .RS 4n
1358 File group owner.
1362 .ne 2
1364 \fBeveryone@\fR
1366 .sp .6
1367 .RS 4n
1368 Everyone access, including file owner and file group owner. This is not
1369 equivalent to the POSIX other class.
1372 The following permissions, supported by the NFSv4 ACL model, are displayed by
1373 using the \fB-v\fR or \fB-V\fR options:
1375 .ne 2
1377 \fBread_data (\fBr\fR)\fR
1379 .sp .6
1380 .RS 4n
1381 Permission to read the data of a file.
1385 .ne 2
1387 \fBlist_directory (\fBr\fR)\fR
1389 .sp .6
1390 .RS 4n
1391 Permission to list the contents of a directory.
1395 .ne 2
1397 \fBwrite_data (\fBw\fR)\fR
1399 .sp .6
1400 .RS 4n
1401 Permission to modify a file's data. anywhere in the file's offset range.
1405 .ne 2
1407 \fBadd_file (\fBw\fR)\fR
1409 .sp .6
1410 .RS 4n
1411 Permission to add a new file to a directory.
1415 .ne 2
1417 \fBappend_data (\fBp\fR)\fR
1419 .sp .6
1420 .RS 4n
1421 The ability to modify a file's data, but only starting at EOF.
1425 .ne 2
1427 \fBadd_subdirectory (\fBp\fR)\fR
1429 .sp .6
1430 .RS 4n
1431 Permission to create a subdirectory to a directory.
1435 .ne 2
1437 \fBread_xattr (\fBR\fR)\fR
1439 .sp .6
1440 .RS 4n
1441 Ability to read the extended attributes of a file.
1445 .ne 2
1447 \fBwrite_xattr (\fBW\fR)\fR
1449 .sp .6
1450 .RS 4n
1451 Ability to create extended attributes or write to the extended attribute
1452 directory.
1456 .ne 2
1458 \fBexecute (\fBx\fR)\fR
1460 .sp .6
1461 .RS 4n
1462 Permission to execute a file.
1466 .ne 2
1468 \fBread_attributes (\fBa\fR)\fR
1470 .sp .6
1471 .RS 4n
1472 The ability to read basic attributes (non-ACLs) of a file.
1476 .ne 2
1478 \fBwrite_attributes (\fBA\fR)\fR
1480 .sp .6
1481 .RS 4n
1482 Permission to change the times associated with a file or directory to an
1483 arbitrary value.
1487 .ne 2
1489 \fBdelete (\fBd\fR)\fR
1491 .sp .6
1492 .RS 4n
1493 Permission to delete a file.
1497 .ne 2
1499 \fBdelete_child (\fBD\fR)\fR
1501 .sp .6
1502 .RS 4n
1503 Permission to delete a file within a directory.
1507 .ne 2
1509 \fBread_acl (\fBc\fR)\fR
1511 .sp .6
1512 .RS 4n
1513 Permission to read the ACL of a file.
1517 .ne 2
1519 \fBwrite_acl (\fBC\fR)\fR
1521 .sp .6
1522 .RS 4n
1523 Permission to write the ACL of a file.
1527 .ne 2
1529 \fBwrite_owner (\fBo\fR)\fR
1531 .sp .6
1532 .RS 4n
1533 Permission to change the owner of a file.
1537 .ne 2
1539 \fBsynchronize (\fBs\fR)\fR
1541 .sp .6
1542 .RS 4n
1543 Permission to access file locally at server with synchronize reads and writes.
1547 .ne 2
1549 \fB\fB-\fR\fR
1551 .sp .6
1552 .RS 4n
1553 No permission granted
1556 The following inheritance flags, supported by the NFSv4 ACL model, are
1557 displayed by using the \fB-v\fR or \fB-V\fR options:
1559 .ne 2
1561 \fBfile_inherit (\fBf\fR)\fR
1563 .sp .6
1564 .RS 4n
1565 Inherit to all newly created files.
1569 .ne 2
1571 \fBdir_inherit (\fBd\fR)\fR
1573 .sp .6
1574 .RS 4n
1575 Inherit to all newly created directories.
1579 .ne 2
1581 \fBinherit_only (\fBi\fR)\fR
1583 .sp .6
1584 .RS 4n
1585 When placed on a directory, do not apply to the directory, only to newly
1586 created files and directories. This flag requires that either
1587 \fBfile_inherit\fR and or \fBdir_inherit\fR is also specified.
1591 .ne 2
1593 \fBno_propagate (\fBn\fR)\fR
1595 .sp .6
1596 .RS 4n
1597 Indicates that ACL entries should be inherited to objects in a directory, but
1598 inheritance should stop after descending one level. This flag is dependent upon
1599 either \fBfile_inherit\fR and or \fBdir_inherit\fR also being specified.
1603 .ne 2
1605 \fBsuccessful_access (\fBS\fR)\fR
1607 .sp .6
1608 .RS 4n
1609 Indicates whether an alarm or audit record should be initiated upon successful
1610 accesses. Used with audit/alarm ACE types.
1614 .ne 2
1616 \fBfailed_access (\fBF\fR)\fR
1618 .sp .6
1619 .RS 4n
1620 Indicates whether an alarm or audit record should be initiated when access
1621 fails. Used with audit/alarm ACE types.
1625 .ne 2
1627 \fBinherited (\fBI\fR)\fR
1629 .sp .6
1630 .RS 4n
1631 ACE was inherited.
1635 .ne 2
1637 \fB\fB-\fR\fR
1639 .sp .6
1640 .RS 4n
1641 No permission granted.
1644 \fIaccess_type\fR is displayed as one of the following types:
1646 .ne 2
1648 \fBalarm\fR
1650 .RS 9n
1651 Permission field that specifies permissions that should trigger an alarm.
1655 .ne 2
1657 \fBallow\fR
1659 .RS 9n
1660 Permission field that specifies allow permissions.
1664 .ne 2
1666 \fBaudit\fR
1668 .RS 9n
1669 Permission field that specifies permissions that should be audited.
1673 .ne 2
1675 \fBdeny\fR
1677 .RS 9n
1678 Permission field that specifies deny permissions.
1681 For example:
1683 .in +2
1685 $ ls -dV /sandbox/dir.1
1686   drwxr-xr-x+  2 root     root           2 Jan 17 15:09 dir.1
1687                   user:marks:r-------------:fd-----:allow
1688                       owner@:--------------:-------:deny
1689                       owner@:rwxp---A-W-Co-:-------:allow
1690                       group@:-w-p----------:-------:deny
1691                       group@:r-x-----------:-------:allow
1692                    everyone@:-w-p---A-W-Co-:-------:deny
1693                    everyone@:r-x---a-R-c--s:-------:allow
1695                            ||||||||||||||||:||||||+ inherited access
1696                              ||||||||||||||:||||||+ failed access
1697                              ||||||||||||||:|||||+--success access
1698                              ||||||||||||||:||||+-- no propagate
1699                              ||||||||||||||:|||+--- inherit only
1700                              ||||||||||||||:||+---- directory inherit
1701                              ||||||||||||||:|+----- file inherit
1702                              ||||||||||||||
1703                              ||||||||||||||+ sync
1704                              |||||||||||||+- change owner
1705                              ||||||||||||+-- write ACL
1706                              |||||||||||+--- read ACL
1707                              ||||||||||+---- write extended attributes
1708                              |||||||||+----- read extended attributes
1709                              ||||||||+------ write attributes
1710                              |||||||+------- read attributes
1711                              ||||||+-------- delete child
1712                              |||||+--------- delete
1713                              ||||+---------- append
1714                              |||+----------- execute
1715                              ||+------------ write data
1716                              |+------------- read data
1718 .in -2
1724 .ne 2
1726 \fB\fB-w\fR \fIcols\fR\fR
1730 \fB\fB--width\fR \fIcols\fR\fR
1732 .sp .6
1733 .RS 4n
1734 Multi-column output where the column width is forced to \fIcols\fR.
1738 .ne 2
1740 \fB\fB-x\fR\fR
1742 .sp .6
1743 .RS 4n
1744 Multi-column output with entries sorted across rather than down the page.
1748 .ne 2
1750 \fB\fB-1\fR\fR
1752 .sp .6
1753 .RS 4n
1754 Prints one entry per line of output.
1758 .ne 2
1760 \fB\fB-@\fR\fR
1762 .sp .6
1763 .RS 4n
1764 The same as \fB-l\fR, except that extended attribute information overrides
1765 \fBACL\fR information. An \fB@\fR is displayed after the file permission bits
1766 for files that have extended attributes.
1770 .ne 2
1772 \fB\fB-/ c\fR | \fBv\fR\fR
1774 .sp .6
1775 .RS 4n
1776 The same as \fB-l\fR, and in addition displays the extended system attributes
1777 associated with the file when extended system attributes are fully supported by
1778 the underlying file system. The option \fB-/\fR supports two option arguments
1779 \fBc\fR (compact mode) and \fBv\fR (verbose mode).
1781 .ne 2
1783 \fB\fBappendonly\fR\fR
1785 .sp .6
1786 .RS 4n
1787 Allows a file to be modified only at offset \fBEOF\fR. Attempts to modify a
1788 file at a location other than \fBEOF\fR fails with \fBEPERM\fR.
1792 .ne 2
1794 \fB\fBarchive\fR\fR
1796 .sp .6
1797 .RS 4n
1798 Indicates if a file has been modified since it was last backed up. Whenever the
1799 modification time (\fBmtime\fR) of a file is changed the \fBarchive\fR
1800 attribute is set.
1804 .ne 2
1806 \fB\fBav_modified\fR\fR
1808 .sp .6
1809 .RS 4n
1810 ZFS sets the anti-virus attribute which whenever a file's content or size
1811 changes or when the file is renamed.
1815 .ne 2
1817 \fB\fBav_quarantined\fR\fR
1819 .sp .6
1820 .RS 4n
1821 Anti-virus software sets to mark a file as quarantined.
1825 .ne 2
1827 \fB\fBcrtime\fR\fR
1829 .sp .6
1830 .RS 4n
1831 Timestamp when a file is created.
1835 .ne 2
1837 \fB\fBhidden\fR\fR
1839 .sp .6
1840 .RS 4n
1841 Marks a file as hidden.
1845 .ne 2
1847 \fB\fBimmutable\fR\fR
1849 .sp .6
1850 .RS 4n
1851 Prevents the content of a file from being modified. Also prevents all metadata
1852 changes, except for access time updates. When placed on a directory, prevents
1853 the deletion and creation of files in the directories. Attempts to modify the
1854 content of a file or directory marked as \fBimmutable\fR fail with \fBEPERM\fR.
1855 Attempts to modify any attributes (with the exception of access time and, with
1856 the proper privileges, the \fBimmutable\fR) of a file marked as \fBimmutable\fR
1857 fails with \fBEPERM\fR.
1861 .ne 2
1863 \fB\fBnodump\fR\fR
1865 .sp .6
1866 .RS 4n
1867 Solaris systems have no special semantics for this attribute.
1871 .ne 2
1873 \fB\fBnounlink\fR\fR
1875 .sp .6
1876 .RS 4n
1877 Prevents a file from being deleted. On a directory, the attribute also prevents
1878 any changes to the contents of the directory. That is, no files within the
1879 directory can be removed or renamed. The \fBerrno\fR \fBEPERM\fR is returned
1880 when attempting to unlink or rename files and directories that are marked as
1881 \fBnounlink\fR.
1885 .ne 2
1887 \fB\fBoffline\fR\fR
1889 .sp .6
1890 .RS 4n
1891 Indicate that a file is offline.  Solaris systems have no special semantics for
1892 this attribute.
1896 .ne 2
1898 \fB\fBreadonly\fR\fR
1900 .sp .6
1901 .RS 4n
1902 Marks a file as \fBreadonly\fR. Once a file is marked as \fBreadonly\fR the
1903 content data of the file cannot be modified. Other metadata for the file can
1904 still be modified.
1908 .ne 2
1910 \fB\fBsparse\fR\fR
1912 .sp .6
1913 .RS 4n
1914 Indicate that a file can be interpreted as sparse.  It does not indicate that
1915 the file is actually sparse or not.  The sparse attribute is cleared when the
1916 file is truncated to zero length.  Solaris systems have no other special
1917 semantics for this attribute.
1921 .ne 2
1923 \fB\fBsystem\fR\fR
1925 .sp .6
1926 .RS 4n
1927 Solaris systems have no special semantics for this attribute.
1934 The display characters used in compact mode (\fB-/ c\fR) are as follows:
1936 .in +2
1938 Attribute Name     Display
1939 archive            A
1940 hidden             H
1941 readonly           R
1942 system             S
1943 appendonly         a
1944 nodump             d
1945 immutable          i
1946 av_modified        m
1947 av_quarantined     q
1948 nounlink           u
1949 offline            O
1950 sparse             s
1952 .in -2
1957 The display in verbose mode (\fB-/ v\fR) uses full attribute names when it is set and
1958 the name prefixed by 'no' when it is not set.
1961 The attribute name \fBcrtime\fR and all other timestamps are handled by the
1962 option \fB-%\fR with the respective timestamp option arguments and also with
1963 \fBall\fR option argument. The display positions are as follows: The display in
1964 verbose mode (\fB-/ v\fR) uses full attribute names  when it is set and the
1965 name prefixed by \fBno\fR when it is not set. The attribute name \fBcrtime\fR
1966 and all other timestamps are handled by the option \fB-%\fR with the respective
1967 timestamp option arguments and also with \fBall\fR option argument.
1970 The display positions are as follows:
1972 .in +2
1974 {||||||||||||}
1975  |||||||||||+- s (sparse)
1976  ||||||||||+-- O (offline)
1977  |||||||||+--- u (nounlink)
1978  ||||||||+---- q (av_quarantined)
1979  |||||||+----- m (av_modified)
1980  ||||||+------ i (immutable)
1981  |||||+------- d (nodump)
1982  ||||+-------- a (appendonly)
1983  |||+--------- S (system)
1984  ||+---------- R (readonly)
1985  |+----------- H (hidden)
1986  +------------ A (archive)
1988 .in -2
1992 .in +2
1994 -% atime | crtime | ctime | mtime | all
1996 .in -2
2000 .ne 2
2002 \fB\fBatime\fR\fR
2004 .sp .6
2005 .RS 4n
2006 Equivalent to \fB-u\fR.
2010 .ne 2
2012 \fB\fBcrtime\fR\fR
2014 .sp .6
2015 .RS 4n
2016 Uses the creation time of the file for sorting or printing.
2020 .ne 2
2022 \fB\fBctime\fR\fR
2024 .sp .6
2025 .RS 4n
2026 Equivalent to \fB-c\fR.
2030 .ne 2
2032 \fB\fBmtime\fR\fR
2034 .sp .6
2035 .RS 4n
2036 Uses the last modification time of the file contents for sorting or printing.
2041 If extended system attributes are not supported or if the user does not have
2042 \fBread\fR permission on the file or if the \fBcrtime\fR extended attribute is
2043 not set, \fBcrtime\fR is treated as a synonym for \fBmtime\fR.
2046 When option argument \fBall\fR is specified, all available timestamps are
2047 printed which includes \fBatime\fR, \fBctime\fR, \fBmtime\fR and on the
2048 extended system attribute supporting file systems, \fBcrtime\fR (create time).
2049 The option \fB-% all\fR does not effect which timestamp is displayed in long
2050 format and does not affect sorting.
2052 .ne 2
2054 \fB\fB--block-size\fR \fIsize\fR\fR
2056 .sp .6
2057 .RS 4n
2058 Display sizes in multiples of size. Size can be scaled by suffixing one of
2059 \fBYyZzEePpTtGgMmKk\fR. Additionally, a \fBB\fR can be placed at the end to
2060 indicate powers of 10 instead of 2. For example, . \fB10mB\fR means blocks of
2061 \fB10000000\fR bytes while \fB10m\fR means blocks of \fB10*2^20 -- 10485760
2062 --\fR bytes. This is mutually exclusive with the \fB-h\fR option.
2066 .ne 2
2068 \fB\fB--color\fR \fB[=\fR\fIwhen\fR\fB]\fR\fR
2072 \fB\fB--colour\fR\fB[=\fR\fIwhen\fR\fB]\fR\fR
2074 .sp .6
2075 .RS 4n
2076 Display filenames using color on color-capable terminals. \fIwhen\fR is an
2077 optional argument that determines when to display color output.
2079 Possible values for \fIwhen\fR are:
2081 .ne 2
2083 \fB\fBalways\fR\fR
2087 \fB\fByes\fR\fR
2091 \fB\fBforce\fR\fR
2093 .sp .6
2094 .RS 4n
2095 Always use color.
2099 .ne 2
2101 \fB\fBauto\fR\fR
2105 \fB\fBtty\fR\fR
2109 \fB\fBif-tty\fR\fR
2111 .sp .6
2112 .RS 4n
2113 Use color if a terminal is present.
2117 .ne 2
2119 \fB\fBno\fR\fR
2123 \fB\fBnever\fR\fR
2127 \fB\fBnone\fR\fR
2129 .sp .6
2130 .RS 4n
2131 Never use color. This is the default
2134 See \fBCOLOR OUTPUT\fR for information on how to control the output colors.
2138 .ne 2
2140 \fB\fB--file-type\fR\fR
2142 .sp .6
2143 .RS 4n
2144 Display a suffix after a file depending on it's type, similar to the \fB-F\fR
2145 option, except \fB*\fR is not appended to executable files.
2149 .ne 2
2151 \fB\fB-si\fR\fR
2155 \fB\fB--\fR\fR
2157 .sp .6
2158 .RS 4n
2159 Display human scaled sizes similar to the \fB-h\fR option, except values are
2160 repeatedly divided by 1000 instead of 1024. The last option \fB--si\fR or
2161 \fB-h\fR determines the divisor used.
2165 .ne 2
2167 \fB\fB--time-style\fR style\fR
2169 .sp .6
2170 .RS 4n
2171 Display times using the specified style. This does not effect the times
2172 displayed for extended attributes (\fB-%\fR).
2174 Possible values for \fIstyle\fR are:
2176 .ne 2
2178 \fB\fBfull-iso\fR\fR
2180 .sp .6
2181 .RS 4n
2182 Equivalent to \fB-E\fR.
2186 .ne 2
2188 \fB\fBlong-iso\fR\fR
2190 .sp .6
2191 .RS 4n
2192 Display in \fIYYYY-MM-DD HH:MM\fR for all files.
2196 .ne 2
2198 \fB\fBiso\fR\fR
2200 .sp .6
2201 .RS 4n
2202 Display older files using \fIYYYY-MM-DD\fR and newer files with \fIMM-DD
2203 HH:MM\fR.
2207 .ne 2
2209 \fB\fBlocale\fR\fR
2211 .sp .6
2212 .RS 4n
2213 Use the default locale format for old and new files. This is the default.
2217 .ne 2
2219 \fB\fB+FORMAT\fR\fR
2221 .sp .6
2222 .RS 4n
2223 Use a custom format. Values are the same as described in \fBstrftime\fR(3C). If
2224 a NEWLINE appears in the string, the first line is used for older files and the
2225 second line is used for newer files. Otherwise, the given format is used for
2226 all files.
2231 .SS "/usr/bin/ls"
2232 .ne 2
2234 \fB\fB-F\fR\fR
2236 .sp .6
2237 .RS 4n
2238 Marks directories with a trailing slash (\fB/\fR), doors with a trailing
2239 greater-than sign (\fB>\fR), executable files with a trailing asterisk
2240 (\fB*\fR), \fBFIFO\fRs with a trailing vertical bar (\fB|\fR), symbolic links
2241 with a trailing "at" sign (\fB@\fR), and \fBAF_UNIX\fR address family sockets
2242 with a trailing equals sign (\fB=\fR). Follows \fBsymlinks\fR named as
2243 operands.
2247 .ne 2
2249 \fB\fB--file-type\fR\fR
2251 .sp .6
2252 .RS 4n
2253 Marks entries as with \fB-F\fR with the exception of executable files.
2254 Executable files are not marked. Follows symlinks named as operands.
2259 Specifying more than one of the options in the following mutually exclusive
2260 pairs is not considered an error: \fB-C\fR and \fB-l\fR (ell), \fB-m\fR and
2261 \fB-l\fR (ell), \fB-x\fR and \fB-l\fR (ell), \fB-@\fR and \fB-l\fR (ell). The
2262 \fB-l\fR option overrides the other option specified in each pair.
2265 Specifying more than one of the options in the following mutually exclusive
2266 groups is not considered an error: \fB-C\fR and \fB-1\fR (one), \fB-H\fR and
2267 \fB-L\fR, \fB-c\fR and \fB-u\fR, and \fB-e\fR and \fB-E\fR, and \fB-t\fR and
2268 \fB-S\fR. The last option specifying a specific timestamp (\fB-c\fR, \fB-u\fR,
2269 \fB-% atime\fR , \fB-% crtime\fR, \fB-% ctime\fR, and \fB-% mtime\fR)
2270 determines the timestamps used for sorting or in long format listings. The last
2271 option \fB-t\fR, \fB-S\fR, or \fB-U\fR determines the sorting behavior.
2272 .SS "/usr/xpg4/bin/ls"
2273 .ne 2
2275 \fB\fB-F\fR\fR
2277 .sp .6
2278 .RS 4n
2279 Marks directories with a trailing slash (\fB/\fR), doors with a trailing
2280 greater-than sign (\fB>\fR), executable files with a trailing asterisk
2281 (\fB*\fR), \fBFIFO\fRs with a trailing vertical bar (\fB|\fR), symbolic links
2282 with a trailing "at" sign (\fB@\fR), and \fBAF_UNIX\fR address family sockets
2283 with a trailing equals sign (\fB=\fR). Follows symlinks named as operands.
2287 .ne 2
2289 \fB\fB--file-type\fR\fR
2291 .sp .6
2292 .RS 4n
2293 Marks entries as with \fB-F\fR with the exception of executable files.
2294 Executable files are not marked. Follows symlinks named as operands.
2299 Specifying more than one of the options in the following groups of mutually
2300 exclusive options is not considered an error: \fB-C\fR and \fB-l\fR (ell),
2301 \fB-m\fR and \fB-l\fR (ell), \fB-x\fR and \fB-l\fR (ell), \fB-@\fR and \fB-l\fR
2302 (ell), \fB-C\fR and \fB-1\fR (one), \fB-H\fR and \fB-L\fR, \fB-c\fR and
2303 \fB-u\fR, \fB-e\fR and \fB-E\fR, \fB-t\fR and \fB-S\fR and \fB-U\fR. The last
2304 option specifying a specific timestamp (\fB-c\fR, \fB-u\fR, \fB-% atime\fR ,
2305 \fB-% crtime\fR, \fB-% ctime\fR, and \fB-% mtime\fR) determines the timestamps
2306 used for sorting or in long format listings. The last \fB-t\fR, \fB-S\fR, or
2307 \fB-U\fR option determines the sorting behavior.
2308 .SS "/usr/xpg6/bin/ls"
2309 .ne 2
2311 \fB\fB-F\fR\fR
2313 .sp .6
2314 .RS 4n
2315 Marks directories with a trailing slash (\fB/\fR), doors with a trailing
2316 greater-than sign (\fB>\fR), executable files with a trailing asterisk
2317 (\fB*\fR), \fBFIFO\fRs with a trailing vertical bar (\fB|\fR), symbolic links
2318 with a trailing "at" sign (\fB@\fR), and \fBAF_UNIX\fR address family sockets
2319 with a trailing equals sign (\fB=\fR). Does not follow symlinks named as
2320 operands unless the \fB-H\fR or \fB-L\fR option is specified.
2324 .ne 2
2326 \fB\fB--file-type\fR\fR
2328 .sp .6
2329 .RS 4n
2330 Marks entries as with \fB-F\fR with the exception of executable files.
2331 Executable files are not marked. Does not follow symlinks named as operands
2332 unless the \fB-H\fR or \fB-L\fR option is specified.
2337 Specifying more than one of the options in the following mutually exclusive
2338 pairs is not considered an error: \fB-C\fR and \fB-l\fR (ell), m and
2339 \fB-l\fR(ell), \fB-x\fR and \fB-l\fR (ell), \fB-@\fR and \fB-l\fR (ell),
2340 \fB-C\fR and \fB-1\fR (one), \fB-H\fR and -\fB-L\fR, \fB-c\fR and \fB-u\fR,
2341 \fB-e\fR and \fB-E\fR, \fB-t\fR and \fB-S\fR and \fB-U\fR. The last option
2342 specifying a specific timestamp (\fB-c\fR, \fB-u\fR, \fB-% atime\fR , \fB-%
2343 crtime\fR, \fB-% ctime\fR, and \fB-% mtime\fR) determines the timestamps used
2344 for sorting or in long format listings. The last \fB-t\fR, \fB-S\fR, or
2345 \fB-U\fR option determines the sorting behavior.
2346 .SH OPERANDS
2348 The following operand is supported:
2350 .ne 2
2352 \fB\fIfile\fR\fR
2354 .sp .6
2355 .RS 4n
2356 A path name of a file to be written. If the file specified is not found, a
2357 diagnostic message is output on standard error.
2360 .SH USAGE
2362 See \fBlargefile\fR(5) for the description of the behavior of \fBls\fR when
2363 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
2364 .SH EXAMPLES
2366 \fBExample 1 \fRViewing File Permissions
2369 The following example shows how to display detailed information about a file.
2372 .in +2
2374 % ls -l file.1
2375 -rw-r--r--   1 gozer    staff     206663 Mar 14 10:15 file.1
2377 .in -2
2382 The permissions string above (\fB-rw-r--r--\fR) describes that the file owner
2383 has read and write permissions, the owning group has read permissions, and
2384 others have read permissions.
2388 The following example shows how to display detailed information about a
2389 directory.
2392 .in +2
2394 % ls -ld test.dir
2395 drwxr-xr-x   2 gozer    staff          2 Mar 14 10:17 test.dir
2397 .in -2
2402 The permissions string above (\fBdrwxr-xr-x\fR) describes that the directory
2403 owner has read, write, and search permissions, the owning group has read and
2404 search permissions, and others have read and search permissions.
2408 Another example of listing file permissions is as follows:
2411 .in +2
2413 % ls -l file.2
2414 -rw-rwl---   1 gozer    staff     206663 Mar 14 10:47 file.2
2416 .in -2
2421 The permissions string above (\fB-rw-rwl---\fR) describes that the file owner
2422 has read and write permissions, the owning group has read and write
2423 permissions, and the file can be locked during access.
2426 \fBExample 2 \fRDisplaying ACL Information on Files and Directories
2429 The following example shows how to display verbose ACL information on a ZFS
2430 file.
2433 .in +2
2435 % ls -v file.1
2436 -rw-r--r--   1 marks    staff     206663 Mar 14 10:15 file.1
2437      0:owner@:execute:deny
2438      1:owner@:read_data/write_data/append_data/write_xattr/write_attributes
2439           /write_acl/write_owner:allow
2440      2:group@:write_data/append_data/execute:deny
2441      3:group@:read_data:allow
2442      4:everyone@:write_data/append_data/write_xattr/execute/write_attributes
2443           /write_acl/write_owner:deny
2444      5:everyone@:read_data/read_xattr/read_attributes/read_acl/synchronize
2445           :allow
2447 .in -2
2452 The following example shows how to display compact ACL information on a ZFS
2453 directory.
2456 .in +2
2458 % ls -dV test.dir
2459 drwxr-xr-x   2 marks    staff          2 Mar 14 10:17 test.dir
2460             owner@:--------------:------:deny
2461             owner@:rwxp---A-W-Co-:------:allow
2462             group@:-w-p----------:------:deny
2463             group@:r-x-----------:------:allow
2464             everyone@:-w-p---A-W-Co-:------:deny
2465             everyone@:r-x---a-R-c--s:------:allow
2467 .in -2
2472 The following example illustrates the \fBls\fR \fB-v\fR behavior when listing
2473 ACL  information on a UFS file.
2476 .in +2
2478 $ ls -v file.3
2479 -rw-r--r--   1 root     root        2703 Mar 14 10:59 file.3
2480      0:user::rw-
2481      1:group::r--               #effective:r--
2482      2:mask:r--
2483      3:other:r--
2485 .in -2
2489 \fBExample 3 \fRPrinting the Names of All Files
2492 The following example prints the names of all files in the current directory,
2493 including those that begin with a dot (\fB\&.\fR), which normally do not print:
2496 .in +2
2498 example% \fBls -a\fR
2500 .in -2
2504 \fBExample 4 \fRProviding File Information
2507 The following example provides file information:
2510 .in +2
2512 example% ls -aisn
2514 .in -2
2519 This command provides information on \fBa\fRll files, including those that
2520 begin with a dot (\fBa\fR), the \fBi\fR-number, the memory address of the
2521 i-node associated with the file\(emprinted in the left-hand column (\fBi\fR);
2522 the \fBs\fRize (in blocks) of the files, printed in the column to the right of
2523 the i-numbers (\fBs\fR); finally, the report is displayed in the \fBn\fRumeric
2524 version of the long list, printing the \fBUID\fR (instead of user name) and
2525 \fBGID\fR (instead of group name) numbers associated with the files.
2529 When the sizes of the files in a directory are listed, a total count of blocks,
2530 including indirect blocks, is printed.
2533 \fBExample 5 \fRProviding Extended System Attributes Information
2535 .in +2
2537 example% ls -/ c file    (extended system attribute in compact mode)
2538 -rw-r--r--   1 root     root           0 May 10 14:17 file
2539                          {AHRSadim-u--}
2541 .in -2
2546 In this example, \fBav_quarantined\fR, \fBoffline\fR, and \fBsparse\fR
2547 are not set.
2549 .in +2
2551 example% ls -/ v file (extended system attribute in verbose mode)
2552 -rw-r--r--   1 root     root           0 May 10 14:17 file
2553                 {archive,hidden,readonly,system,\e
2554                  appendonly,nodump,immutable,av_modified,\e
2555                  noav_quarantined,nounlink,nooffline,\e
2556                  nosparse}
2558 example% ls -/ v file     (no extended system attribute)
2559 -rw-r--r--  1 root    staff        0 May 16 14:48 file
2560                {}
2562 example% ls -/ c file        (extended system attribute
2563                               supported file system)
2565 -rw-r--r--  1 root staff        3 Jun  4 22:04 file
2566                {A------m----}
2568 .in -2
2573 \fBarchive\fR and \fBav_modified\fR attributes are set by default on  an
2574 extended system attribute supported file.
2576 .in +2
2578 example% ls -/ c  -%crtime file
2580 -rw-r--r--    root     root          0 May 10 14:17 file
2581                {AHRSadim-u--}
2583 .in -2
2588 This example displays the timestamp as the creation time:
2590 .in +2
2592 example% ls -l -%all file
2593 -rw-r--r--   1 root     root           0 May 10 14:17    file
2594                 timestamp: atime    Jun 14 08:47:37 2007
2595                 timestamp: ctime    May 10 14:20:23 2007
2596                 timestamp: mtime    May 10 14:17:56 2007
2597                 timestamp: crtime   May 10 14:17:56 2007
2599 example% ls -%crtime -tl file*
2601 -rw-r--r--   1 foo      staff          3 Jun  4 22:04 file1
2602 -rw-r--r--   1 root     root           0 May 10 14:17 file
2603 -rw-r--r--   1 foo      staff          0 May  9 13:49 file.1
2605 .in -2
2610 In this example the files are sorted by creation time.
2611 .SH ENVIRONMENT VARIABLES
2613 See \fBenviron\fR(5) for descriptions of the following environment variables
2614 that affect the execution of \fBls\fR: \fBLANG\fR, \fBLC_ALL\fR,
2615 \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_TIME\fR, \fBLC_MESSAGES\fR,
2616 \fBNLSPATH\fR, and \fBTZ\fR.
2618 .ne 2
2620 \fB\fBCOLUMNS\fR\fR
2622 .sp .6
2623 .RS 4n
2624 Determines the user's preferred column position width for writing multiple
2625 text-column output. If this variable contains a string representing a decimal
2626 integer, the \fBls\fR utility calculates how many path name text columns to
2627 write (see \fB-C\fR) based on the width provided. If \fBCOLUMNS\fR is not set
2628 or is invalid, 80 is used. The column width chosen to write the names of files
2629 in any given directory is constant. File names are not be truncated to fit into
2630 the multiple text-column output.
2634 .ne 2
2636 \fB\fBLS_COLORS\fR\fR
2638 .sp .6
2639 .RS 4n
2640 Determines the coloring scheme used when displaying color output. If not set
2641 and color output is specified, a default scheme is used. If TERM is not set, no
2642 color output is used.
2646 .ne 2
2648 \fB\fBTERM\fR\fR
2650 .sp .6
2651 .RS 4n
2652 Determine the terminal type. If this variable is unset or NULL, no color output
2653 is generated regardless of the value of the --color option.
2656 .SH EXIT STATUS
2657 .ne 2
2659 \fB\fB0\fR\fR
2661 .RS 6n
2662 All information was written successfully.
2666 .ne 2
2668 \fB\fB>0\fR\fR
2670 .RS 6n
2671 An error occurred.
2674 .SH FILES
2675 .ne 2
2677 \fB\fB/etc/group\fR\fR
2679 .sp .6
2680 .RS 4n
2681 group IDs for \fBls\fR \fB-l\fR and \fBls\fR \fB-g\fR
2685 .ne 2
2687 \fB\fB/etc/passwd\fR\fR
2689 .sp .6
2690 .RS 4n
2691 user IDs for \fBls\fR \fB-l\fR and \fBls\fR \fB-o\fR
2695 .ne 2
2697 \fB\fB/usr/share/lib/terminfo/?/*\fR\fR
2699 .sp .6
2700 .RS 4n
2701 terminal information database
2704 .SH ATTRIBUTES
2706 See \fBattributes\fR(5) for descriptions of the following attributes:
2707 .SS "/usr/bin/ls"
2710 box;
2711 c | c
2712 l | l .
2713 ATTRIBUTE TYPE  ATTRIBUTE VALUE
2715 CSI     Enabled
2717 Interface Stability     Committed
2719 Standard        See below.
2724 For all options except \fB-A\fR, \fB-b\fR, \fB-e\fR, \fB-E,\fR \fB-h\fR,
2725 \fB-S\fR, U \fB-v\fR, \fB-V\fR, \fB-@\fR, \fB-/\fR, \fB-%\fR, \fB--all\fR,
2726 \fB--almost-all\fR, \fB--block-size\fR, \fB--classify\fR, \fB--color\fR,
2727 \fB--colour\fR, \fB--dereference\fR, \fB--dereference-command-line\fR,
2728 \fB--escape\fR, \fB--file-type\fR, \fB--full-time\fR, \fB--human-readable\fR,
2729 \fB--ignore-backups\fR, \fB--inode\fR, \fB--no-group\fR,
2730 \fB--numeric-uid-gid\fR, \fB--reverse\fR, \fB--recursive\fR, \fB--si\fR,
2731 \fB--size\fR, and \fB--time-style\fR, see \fBstandards\fR(5).
2732 .SS "/usr/xpg4/bin/ls"
2735 box;
2736 c | c
2737 l | l .
2738 ATTRIBUTE TYPE  ATTRIBUTE VALUE
2740 CSI     Enabled
2742 Interface Stability     Committed
2744 Standard        See below.
2749 For all options except \fB-A\fR, \fB-b\fR, \fB-e\fR, \fB-E,\fR \fB-h\fR,
2750 \fB-S\fR, U \fB-v\fR, \fB-V\fR, \fB-@\fR, \fB-/\fR, \fB-%\fR, \fB--all\fR,
2751 \fB--almost-all\fR, \fB--block-size\fR, \fB--classify\fR, \fB--color\fR,
2752 \fB--colour\fR, \fB--dereference\fR, \fB--dereference-command-line\fR,
2753 \fB--escape\fR, \fB--file-type\fR, \fB--full-time\fR, \fB--human-readable\fR,
2754 \fB--ignore-backups\fR, \fB--inode\fR, \fB--no-group\fR,
2755 \fB--numeric-uid-gid\fR, \fB--reverse\fR, \fB--recursive\fR, \fB--si\fR,
2756 \fB--size\fR, and \fB--time-style\fR, see \fBstandards\fR(5).
2757 .SS "/usr/xpg6/bin/ls"
2760 box;
2761 c | c
2762 l | l .
2763 ATTRIBUTE TYPE  ATTRIBUTE VALUE
2765 CSI     Enabled
2767 Interface Stability     Committed
2769 Standard        See below.
2774 For all options except \fB-A\fR, \fB-b\fR, \fB-e\fR, \fB-E,\fR \fB-h\fR,
2775 \fB-S\fR, U \fB-v\fR, \fB-V\fR, \fB-@\fR, \fB-/\fR, \fB-%\fR, \fB--all\fR,
2776 \fB--almost-all\fR, \fB--block-size\fR, \fB--classify\fR, \fB--color\fR,
2777 \fB--colour\fR, \fB--dereference\fR, \fB--dereference-command-line\fR,
2778 \fB--escape\fR, \fB--file-type\fR, \fB--full-time\fR, \fB--human-readable\fR,
2779 \fB--ignore-backups\fR, \fB--inode\fR, \fB--no-group\fR,
2780 \fB--numeric-uid-gid\fR, \fB--reverse\fR, \fB--recursive\fR, \fB--si\fR,
2781 \fB--size\fR, and \fB--time-style\fR, see \fBstandards\fR(5).
2782 .SH SEE ALSO
2784 \fBchmod\fR(1), \fBcp\fR(1), \fBsetfacl\fR(1), \fBfgetattr\fR(3C),
2785 \fBstrftime\fR(3C), \fBterminfo\fR(4), \fBacl\fR(5), \fBattributes\fR(5),
2786 \fBenviron\fR(5), \fBfsattr\fR(5), \fBlargefile\fR(5), \fBstandards\fR(5)
2787 .SH NOTES
2789 Unprintable characters in file names can confuse the columnar output options.
2792 The total block count is incorrect if there are hard links among the files.
2795 The sort order of \fBls\fR output is affected by the locale and can be
2796 overridden by the \fBLC_COLLATE\fR environment variable. For example, if
2797 \fBLC_COLLATE\fR equals \fBC\fR, dot files appear first, followed by names
2798 beginning with upper-case letters, then followed by names beginning with
2799 lower-case letters. But if \fBLC_COLLATE\fR equals \fBen_US.ISO8859-1\fR, then
2800 leading dots as well as case are ignored in determining the sort order.