]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - bin/ls/ls.1
bhnd(9): Fix a few mandoc related issues
[FreeBSD/FreeBSD.git] / bin / ls / ls.1
1 .\"-
2 .\" Copyright (c) 1980, 1990, 1991, 1993, 1994
3 .\"     The Regents of the University of California.  All rights reserved.
4 .\"
5 .\" This code is derived from software contributed to Berkeley by
6 .\" the Institute of Electrical and Electronics Engineers, Inc.
7 .\"
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
10 .\" are met:
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\"    notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\"    notice, this list of conditions and the following disclaimer in the
15 .\"    documentation and/or other materials provided with the distribution.
16 .\" 3. Neither the name of the University nor the names of its contributors
17 .\"    may be used to endorse or promote products derived from this software
18 .\"    without specific prior written permission.
19 .\"
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" SUCH DAMAGE.
31 .\"
32 .\"     @(#)ls.1        8.7 (Berkeley) 7/29/94
33 .\" $FreeBSD$
34 .\"
35 .Dd August 31, 2020
36 .Dt LS 1
37 .Os
38 .Sh NAME
39 .Nm ls
40 .Nd list directory contents
41 .Sh SYNOPSIS
42 .Nm
43 .Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1\&,
44 .Op Fl -color Ns = Ns Ar when
45 .Op Fl D Ar format
46 .Op Ar
47 .Sh DESCRIPTION
48 For each operand that names a
49 .Ar file
50 of a type other than
51 directory,
52 .Nm
53 displays its name as well as any requested,
54 associated information.
55 For each operand that names a
56 .Ar file
57 of type directory,
58 .Nm
59 displays the names of files contained
60 within that directory, as well as any requested, associated
61 information.
62 .Pp
63 If no operands are given, the contents of the current
64 directory are displayed.
65 If more than one operand is given,
66 non-directory operands are displayed first; directory
67 and non-directory operands are sorted separately and in
68 lexicographical order.
69 .Pp
70 The following options are available:
71 .Bl -tag -width indent
72 .It Fl A
73 Include directory entries whose names begin with a
74 dot
75 .Pq Sq Pa \&.
76 except for
77 .Pa \&.
78 and
79 .Pa .. .
80 Automatically set for the super-user unless
81 .Fl I
82 is specified.
83 .It Fl B
84 Force printing of non-printable characters (as defined by
85 .Xr ctype 3
86 and current locale settings) in file names as
87 .Li \e Ns Va xxx ,
88 where
89 .Va xxx
90 is the numeric value of the character in octal.
91 This option is not defined in
92 .St -p1003.1-2008 .
93 .It Fl C
94 Force multi-column output; this is the default when output is to a terminal.
95 .It Fl D Ar format
96 When printing in the long
97 .Pq Fl l
98 format, use
99 .Ar format
100 to format the date and time output.
101 The argument
102 .Ar format
103 is a string used by
104 .Xr strftime 3 .
105 Depending on the choice of format string, this may result in a
106 different number of columns in the output.
107 This option overrides the
108 .Fl T
109 option.
110 This option is not defined in
111 .St -p1003.1-2008 .
112 .It Fl F
113 Display a slash
114 .Pq Ql /
115 immediately after each pathname that is a directory,
116 an asterisk
117 .Pq Ql *
118 after each that is executable,
119 an at sign
120 .Pq Ql @
121 after each symbolic link,
122 an equals sign
123 .Pq Ql =
124 after each socket,
125 a percent sign
126 .Pq Ql %
127 after each whiteout,
128 and a vertical bar
129 .Pq Ql \&|
130 after each that is a
131 .Tn FIFO .
132 .It Fl G
133 Enable colorized output.
134 This option is equivalent to defining
135 .Ev CLICOLOR
136 or
137 .Ev COLORTERM
138 in the environment and setting
139 .Fl -color Ns = Ns Ar auto .
140 (See below.)
141 This functionality can be compiled out by removing the definition of
142 .Ev COLORLS .
143 This option is not defined in
144 .St -p1003.1-2008 .
145 .It Fl H
146 Symbolic links on the command line are followed.
147 This option is assumed if
148 none of the
149 .Fl F , d ,
150 or
151 .Fl l
152 options are specified.
153 .It Fl I
154 Prevent
155 .Fl A
156 from being automatically set for the super-user.
157 This option is not defined in
158 .St -p1003.1-2008 .
159 .It Fl L
160 If argument is a symbolic link, list the file or directory the link references
161 rather than the link itself.
162 This option cancels the
163 .Fl P
164 option.
165 .It Fl P
166 If argument is a symbolic link, list the link itself rather than the
167 object the link references.
168 This option cancels the
169 .Fl H
170 and
171 .Fl L
172 options.
173 .It Fl R
174 Recursively list subdirectories encountered.
175 .It Fl S
176 Sort by size (largest file first) before sorting the operands in
177 lexicographical order.
178 .It Fl T
179 When printing in the long
180 .Pq Fl l
181 format, display complete time information for the file, including
182 month, day, hour, minute, second, and year.
183 The
184 .Fl D
185 option gives even more control over the output format.
186 This option is not defined in
187 .St -p1003.1-2008 .
188 .It Fl U
189 Use time when file was created for sorting or printing.
190 This option is not defined in
191 .St -p1003.1-2008 .
192 .It Fl W
193 Display whiteouts when scanning directories.
194 This option is not defined in
195 .St -p1003.1-2008 .
196 .It Fl Z
197 Display each file's MAC label; see
198 .Xr maclabel 7 .
199 This option is not defined in
200 .St -p1003.1-2008 .
201 .It Fl a
202 Include directory entries whose names begin with a
203 dot
204 .Pq Sq Pa \&. .
205 .It Fl b
206 As
207 .Fl B ,
208 but use
209 .Tn C
210 escape codes whenever possible.
211 This option is not defined in
212 .St -p1003.1-2008 .
213 .It Fl c
214 Use time when file status was last changed for sorting or printing.
215 .It Fl -color Ns = Ns Ar when
216 Output colored escape sequences based on
217 .Ar when ,
218 which may be set to either
219 .Cm always ,
220 .Cm auto ,
221 or
222 .Cm never .
223 .Pp
224 .Cm always
225 will make
226 .Nm
227 always output color.
228 If
229 .Ev TERM
230 is unset or set to an invalid terminal, then
231 .Nm
232 will fall back to explicit
233 .Tn ANSI
234 escape sequences without the help of
235 .Xr termcap 5 .
236 .Cm always
237 is the default if
238 .Fl -color
239 is specified without an argument.
240 .Pp
241 .Cm auto
242 will make
243 .Nm
244 output escape sequences based on
245 .Xr termcap 5 ,
246 but only if
247 .Dv stdout
248 is a tty and either the
249 .Fl G
250 flag is specified or the
251 .Ev COLORTERM
252 environment variable is set and not empty.
253 .Pp
254 .Cm never
255 will disable color regardless of environment variables.
256 .Cm never
257 is the default when neither
258 .Fl -color
259 nor
260 .Fl G
261 is specified.
262 .Pp
263 For compatibility with GNU coreutils,
264 .Nm
265 supports
266 .Cm yes
267 or
268 .Cm force
269 as equivalent to
270 .Cm always ,
271 .Cm no
272 or
273 .Cm none
274 as equivalent to
275 .Cm never ,
276 and
277 .Cm tty
278 or
279 .Cm if-tty
280 as equivalent to
281 .Cm auto .
282 .It Fl d
283 Directories are listed as plain files (not searched recursively).
284 .It Fl f
285 Output is not sorted.
286 This option turns on
287 .Fl a .
288 It also negates the effect of the
289 .Fl r ,
290 .Fl S
291 and
292 .Fl t
293 options.
294 As allowed by
295 .St -p1003.1-2008 ,
296 this option has no effect on the
297 .Fl d ,
298 .Fl l ,
299 .Fl R
300 and
301 .Fl s
302 options.
303 .It Fl g
304 This option has no effect.
305 It is only available for compatibility with
306 .Bx 4.3 ,
307 where it was used to display the group name in the long
308 .Pq Fl l
309 format output.
310 This option is incompatible with
311 .St -p1003.1-2008 .
312 .It Fl h
313 When used with the
314 .Fl l
315 option, use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte
316 and Petabyte in order to reduce the number of digits to four or fewer
317 using base 2 for sizes.
318 This option is not defined in
319 .St -p1003.1-2008 .
320 .It Fl i
321 For each file, print the file's file serial number (inode number).
322 .It Fl k
323 This has the same effect as setting environment variable
324 .Ev BLOCKSIZE
325 to 1024, except that it also nullifies any
326 .Fl h
327 options to its left.
328 .It Fl l
329 (The lowercase letter
330 .Dq ell . )
331 List files in the long format, as described in the
332 .Sx The Long Format
333 subsection below.
334 .It Fl m
335 Stream output format; list files across the page, separated by commas.
336 .It Fl n
337 Display user and group IDs numerically rather than converting to a user
338 or group name in a long
339 .Pq Fl l
340 output.
341 .It Fl o
342 Include the file flags in a long
343 .Pq Fl l
344 output.
345 This option is incompatible with
346 .St -p1003.1-2008 .
347 See
348 .Xr chflags 1
349 for a list of file flags and their meanings.
350 .It Fl p
351 Write a slash
352 .Pq Ql /
353 after each filename if that file is a directory.
354 .It Fl q
355 Force printing of non-graphic characters in file names as
356 the character
357 .Ql \&? ;
358 this is the default when output is to a terminal.
359 .It Fl r
360 Reverse the order of the sort.
361 .It Fl s
362 Display the number of blocks used in the file system by each file.
363 Block sizes and directory totals are handled as described in
364 .Sx The Long Format
365 subsection below, except (if the long format is not also requested)
366 the directory totals are not output when the output is in a
367 single column, even if multi-column output is requested.
368 .It Fl t
369 Sort by descending time modified (most recently modified first).
370 If two files have the same modification timestamp, sort their names
371 in ascending lexicographical order.
372 The
373 .Fl r
374 option reverses both of these sort orders.
375 .Pp
376 Note that these sort orders are contradictory: the time sequence is in
377 descending order, the lexicographical sort is in ascending order.
378 This behavior is mandated by
379 .St -p1003.2 .
380 This feature can cause problems listing files stored with sequential names on
381 FAT file systems, such as from digital cameras, where it is possible to have
382 more than one image with the same timestamp.
383 In such a case, the photos cannot be listed in the sequence in which
384 they were taken.
385 To ensure the same sort order for time and for lexicographical sorting, set the
386 environment variable
387 .Ev LS_SAMESORT
388 or use the
389 .Fl y
390 option.
391 This causes
392 .Nm
393 to reverse the lexicographical sort order when sorting files with the
394 same modification timestamp.
395 .It Fl u
396 Use time of last access,
397 instead of time of last modification
398 of the file for sorting
399 .Pq Fl t
400 or printing
401 .Pq Fl l .
402 .It Fl w
403 Force raw printing of non-printable characters.
404 This is the default
405 when output is not to a terminal.
406 This option is not defined in
407 .St -p1003.1-2001 .
408 .It Fl x
409 The same as
410 .Fl C ,
411 except that the multi-column output is produced with entries sorted
412 across, rather than down, the columns.
413 .It Fl y
414 When the
415 .Fl t
416 option is set, sort the alphabetical output in the same order as the time output.
417 This has the same effect as setting
418 .Ev LS_SAMESORT .
419 See the description of the
420 .Fl t
421 option for more details.
422 This option is not defined in
423 .St -p1003.1-2001 .
424 .It Fl 1
425 (The numeric digit
426 .Dq one . )
427 Force output to be
428 one entry per line.
429 This is the default when
430 output is not to a terminal.
431 .It Fl ,
432 (Comma) When the
433 .Fl l
434 option is set, print file sizes grouped and separated by thousands using the
435 non-monetary separator returned by
436 .Xr localeconv 3 ,
437 typically a comma or period.
438 If no locale is set, or the locale does not have a non-monetary separator, this
439 option has no effect.
440 This option is not defined in
441 .St -p1003.1-2001 .
442 .El
443 .Pp
444 The
445 .Fl 1 , C , x ,
446 and
447 .Fl l
448 options all override each other; the last one specified determines
449 the format used.
450 .Pp
451 The
452 .Fl c , u ,
453 and
454 .Fl U
455 options all override each other; the last one specified determines
456 the file time used.
457 .Pp
458 The
459 .Fl S
460 and
461 .Fl t
462 options override each other; the last one specified determines
463 the sort order used.
464 .Pp
465 The
466 .Fl B , b , w ,
467 and
468 .Fl q
469 options all override each other; the last one specified determines
470 the format used for non-printable characters.
471 .Pp
472 The
473 .Fl H , L
474 and
475 .Fl P
476 options all override each other (either partially or fully); they
477 are applied in the order specified.
478 .Pp
479 By default,
480 .Nm
481 lists one entry per line to standard
482 output; the exceptions are to terminals or when the
483 .Fl C
484 or
485 .Fl x
486 options are specified.
487 .Pp
488 File information is displayed with one or more
489 .Ao blank Ac Ns s
490 separating the information associated with the
491 .Fl i , s ,
492 and
493 .Fl l
494 options.
495 .Ss The Long Format
496 If the
497 .Fl l
498 option is given, the following information
499 is displayed for each file:
500 file mode,
501 number of links, owner name, group name,
502 MAC label,
503 number of bytes in the file, abbreviated
504 month, day-of-month file was last modified,
505 hour file last modified, minute file last
506 modified, and the pathname.
507 .Pp
508 If the modification time of the file is more than 6 months
509 in the past or future, and the
510 .Fl D
511 or
512 .Fl T
513 are not specified,
514 then the year of the last modification
515 is displayed in place of the hour and minute fields.
516 .Pp
517 If the owner or group names are not a known user or group name,
518 or the
519 .Fl n
520 option is given,
521 the numeric ID's are displayed.
522 .Pp
523 If the file is a character special or block special file,
524 the device number for the file is displayed in the size field.
525 If the file is a symbolic link the pathname of the
526 linked-to file is preceded by
527 .Dq Li -> .
528 .Pp
529 The listing of a directory's contents is preceded
530 by a labeled total number of blocks used in the file system by the files
531 which are listed as the directory's contents
532 (which may or may not include
533 .Pa \&.
534 and
535 .Pa ..
536 and other files which start with a dot, depending on other options).
537 .Pp
538 The default block size is 512 bytes.
539 The block size may be set with option
540 .Fl k
541 or environment variable
542 .Ev BLOCKSIZE .
543 Numbers of blocks in the output will have been rounded up so the
544 numbers of bytes is at least as many as used by the corresponding
545 file system blocks (which might have a different size).
546 .Pp
547 The file mode printed under the
548 .Fl l
549 option consists of the
550 entry type and the permissions.
551 The entry type character describes the type of file, as
552 follows:
553 .Pp
554 .Bl -tag -width 4n -offset indent -compact
555 .It Sy \-
556 Regular file.
557 .It Sy b
558 Block special file.
559 .It Sy c
560 Character special file.
561 .It Sy d
562 Directory.
563 .It Sy l
564 Symbolic link.
565 .It Sy p
566 .Tn FIFO .
567 .It Sy s
568 Socket.
569 .It Sy w
570 Whiteout.
571 .El
572 .Pp
573 The next three fields
574 are three characters each:
575 owner permissions,
576 group permissions, and
577 other permissions.
578 Each field has three character positions:
579 .Bl -enum -offset indent
580 .It
581 If
582 .Sy r ,
583 the file is readable; if
584 .Sy \- ,
585 it is not readable.
586 .It
587 If
588 .Sy w ,
589 the file is writable; if
590 .Sy \- ,
591 it is not writable.
592 .It
593 The first of the following that applies:
594 .Bl -tag -width 4n -offset indent
595 .It Sy S
596 If in the owner permissions, the file is not executable and
597 set-user-ID mode is set.
598 If in the group permissions, the file is not executable
599 and set-group-ID mode is set.
600 .It Sy s
601 If in the owner permissions, the file is executable
602 and set-user-ID mode is set.
603 If in the group permissions, the file is executable
604 and setgroup-ID mode is set.
605 .It Sy x
606 The file is executable or the directory is
607 searchable.
608 .It Sy \-
609 The file is neither readable, writable, executable,
610 nor set-user-ID nor set-group-ID mode, nor sticky.
611 (See below.)
612 .El
613 .Pp
614 These next two apply only to the third character in the last group
615 (other permissions).
616 .Bl -tag -width 4n -offset indent
617 .It Sy T
618 The sticky bit is set
619 (mode
620 .Li 1000 ) ,
621 but not execute or search permission.
622 (See
623 .Xr chmod 1
624 or
625 .Xr sticky 7 . )
626 .It Sy t
627 The sticky bit is set (mode
628 .Li 1000 ) ,
629 and is searchable or executable.
630 (See
631 .Xr chmod 1
632 or
633 .Xr sticky 7 . )
634 .El
635 .El
636 .Pp
637 The next field contains a
638 plus
639 .Pq Ql +
640 character if the file has an ACL, or a
641 space
642 .Pq Ql " "
643 if it does not.
644 The
645 .Nm
646 utility does not show the actual ACL;
647 use
648 .Xr getfacl 1
649 to do this.
650 .Sh ENVIRONMENT
651 The following environment variables affect the execution of
652 .Nm :
653 .Bl -tag -width ".Ev CLICOLOR_FORCE"
654 .It Ev BLOCKSIZE
655 If this is set, its value, rounded up to 512 or down to a
656 multiple of 512, will be used as the block size in bytes by the
657 .Fl l
658 and
659 .Fl s
660 options.
661 See
662 .Sx The Long Format
663 subsection for more information.
664 .It Ev CLICOLOR
665 Use
666 .Tn ANSI
667 color sequences to distinguish file types.
668 See
669 .Ev LSCOLORS
670 below.
671 In addition to the file types mentioned in the
672 .Fl F
673 option some extra attributes (setuid bit set, etc.) are also displayed.
674 The colorization is dependent on a terminal type with the proper
675 .Xr termcap 5
676 capabilities.
677 The default
678 .Dq Li cons25
679 console has the proper capabilities,
680 but to display the colors in an
681 .Xr xterm 1 ,
682 for example,
683 the
684 .Ev TERM
685 variable must be set to
686 .Dq Li xterm-color .
687 Other terminal types may require similar adjustments.
688 Colorization
689 is silently disabled if the output is not directed to a terminal
690 unless the
691 .Ev CLICOLOR_FORCE
692 variable is defined or
693 .Fl -color
694 is set to
695 .Dq always .
696 .It Ev CLICOLOR_FORCE
697 Color sequences are normally disabled if the output is not directed to
698 a terminal.
699 This can be overridden by setting this variable.
700 The
701 .Ev TERM
702 variable still needs to reference a color capable terminal however
703 otherwise it is not possible to determine which color sequences to
704 use.
705 .It Ev COLORTERM
706 See description for
707 .Ev CLICOLOR
708 above.
709 .It Ev COLUMNS
710 If this variable contains a string representing a
711 decimal integer, it is used as the
712 column position width for displaying
713 multiple-text-column output.
714 The
715 .Nm
716 utility calculates how
717 many pathname text columns to display
718 based on the width provided.
719 (See
720 .Fl C
721 and
722 .Fl x . )
723 .It Ev LANG
724 The locale to use when determining the order of day and month in the long
725 .Fl l
726 format output.
727 See
728 .Xr environ 7
729 for more information.
730 .It Ev LSCOLORS
731 The value of this variable describes what color to use for which
732 attribute when colors are enabled with
733 .Ev CLICOLOR
734 or
735 .Ev COLORTERM .
736 This string is a concatenation of pairs of the format
737 .Ar f Ns Ar b ,
738 where
739 .Ar f
740 is the foreground color and
741 .Ar b
742 is the background color.
743 .Pp
744 The color designators are as follows:
745 .Pp
746 .Bl -tag -width 4n -offset indent -compact
747 .It Sy a
748 black
749 .It Sy b
750 red
751 .It Sy c
752 green
753 .It Sy d
754 brown
755 .It Sy e
756 blue
757 .It Sy f
758 magenta
759 .It Sy g
760 cyan
761 .It Sy h
762 light grey
763 .It Sy A
764 bold black, usually shows up as dark grey
765 .It Sy B
766 bold red
767 .It Sy C
768 bold green
769 .It Sy D
770 bold brown, usually shows up as yellow
771 .It Sy E
772 bold blue
773 .It Sy F
774 bold magenta
775 .It Sy G
776 bold cyan
777 .It Sy H
778 bold light grey; looks like bright white
779 .It Sy x
780 default foreground or background
781 .El
782 .Pp
783 Note that the above are standard
784 .Tn ANSI
785 colors.
786 The actual display may differ
787 depending on the color capabilities of the terminal in use.
788 .Pp
789 The order of the attributes are as follows:
790 .Pp
791 .Bl -enum -offset indent -compact
792 .It
793 directory
794 .It
795 symbolic link
796 .It
797 socket
798 .It
799 pipe
800 .It
801 executable
802 .It
803 block special
804 .It
805 character special
806 .It
807 executable with setuid bit set
808 .It
809 executable with setgid bit set
810 .It
811 directory writable to others, with sticky bit
812 .It
813 directory writable to others, without sticky bit
814 .El
815 .Pp
816 The default is
817 .Qq "exfxcxdxbxegedabagacad" ,
818 i.e., blue foreground and
819 default background for regular directories, black foreground and red
820 background for setuid executables, etc.
821 .It Ev LS_COLWIDTHS
822 If this variable is set, it is considered to be a
823 colon-delimited list of minimum column widths.
824 Unreasonable
825 and insufficient widths are ignored (thus zero signifies
826 a dynamically sized column).
827 Not all columns have changeable widths.
828 The fields are,
829 in order: inode, block count, number of links, user name,
830 group name, flags, file size, file name.
831 .It Ev LS_SAMESORT
832 If this variable is set, the
833 .Fl t
834 option sorts the names of files with the same modification timestamp in the same
835 sense as the time sort.
836 See the description of the
837 .Fl t
838 option for more details.
839 .It Ev TERM
840 The
841 .Ev CLICOLOR
842 and
843 .Ev COLORTERM
844 functionality depends on a terminal type with color capabilities.
845 .It Ev TZ
846 The timezone to use when displaying dates.
847 See
848 .Xr environ 7
849 for more information.
850 .El
851 .Sh EXIT STATUS
852 .Ex -std
853 .Sh EXAMPLES
854 List the contents of the current working directory in long format:
855 .Pp
856 .Dl $ ls -l
857 .Pp
858 In addition to listing the contents of the current working directory in
859 long format, show inode numbers, file flags (see
860 .Xr chflags 1 ) ,
861 and suffix each filename with a symbol representing its file type:
862 .Pp
863 .Dl $ ls -lioF
864 .Pp
865 List the files in
866 .Pa /var/log ,
867 sorting the output such that the mostly recently modified entries are
868 printed first:
869 .Pp
870 .Dl $ ls -lt /var/log
871 .Sh COMPATIBILITY
872 The group field is now automatically included in the long listing for
873 files in order to be compatible with the
874 .St -p1003.2
875 specification.
876 .Sh SEE ALSO
877 .Xr chflags 1 ,
878 .Xr chmod 1 ,
879 .Xr getfacl 1 ,
880 .Xr sort 1 ,
881 .Xr xterm 1 ,
882 .Xr localeconv 3 ,
883 .Xr strftime 3 ,
884 .Xr strmode 3 ,
885 .Xr termcap 5 ,
886 .Xr maclabel 7 ,
887 .Xr sticky 7 ,
888 .Xr symlink 7 ,
889 .Xr getfmac 8
890 .Sh STANDARDS
891 With the exception of options
892 .Fl g , n
893 and
894 .Fl o ,
895 the
896 .Nm
897 utility conforms to
898 .St -p1003.1-2001
899 and
900 .St -p1003.1-2008 .
901 The options
902 .Fl B , D , G , I , T , U , W , Z , b , h , w , y
903 and
904 .Fl ,
905 are non-standard extensions.
906 .Pp
907 The ACL support is compatible with
908 .Tn IEEE
909 Std\~1003.2c
910 .Pq Dq Tn POSIX Ns .2c
911 Draft\~17
912 (withdrawn).
913 .Sh HISTORY
914 An
915 .Nm
916 command appeared in
917 .At v1 .
918 .Sh BUGS
919 To maintain backward compatibility, the relationships between the many
920 options are quite complex.
921 .Pp
922 The exception mentioned in the
923 .Fl s
924 option description might be a feature that was
925 based on the fact that single-column output
926 usually goes to something other than a terminal.
927 It is debatable whether this is a design bug.
928 .Pp
929 .St -p1003.2
930 mandates opposite sort orders for files with the same timestamp when
931 sorting with the
932 .Fl t
933 option.