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