summaryrefslogtreecommitdiff
path: root/bin/ls/ls.1
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2008-09-04 15:44:42 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2008-09-04 15:44:42 +0000
commitecfe00efc6d765c4ac7c281c9e2d226c4f5518e5 (patch)
tree6cdb7aa97ec6587719f0a83d96a241df412e5574 /bin/ls/ls.1
parenta27702fcc2bb21fc0dee53d8632b99f13e857baa (diff)
- make -ln and -nl combinations behave identically. currently -l overrides -n.
behaviour now similar to netbsd/freebsd/solaris. - make -gn and -ng combinations behave identically: long listing, numeric group ID, no user ID. currently -g overrides -n. behaviour now similar to netbsd/solaris. - allow -m and -x to override -1Cgln (and each other) if specified last. currently -m and -x can be overriden even if they are specified last. behaviour now similar to netbsd/freebsd. fixes PR 5785 from Jacek Masiulaniec. - update man page to reflect reality. ls.c diff based on Jacek Masiulaniec's diff from PR 5785, and extended by sobrado. this work is really a joint effort from sobrado and myself. i don't know about igor, but this particular diff has nearly killed me... ok millert otto
Diffstat (limited to 'bin/ls/ls.1')
-rw-r--r--bin/ls/ls.1100
1 files changed, 61 insertions, 39 deletions
diff --git a/bin/ls/ls.1 b/bin/ls/ls.1
index 896e03e8954..914f3a5d014 100644
--- a/bin/ls/ls.1
+++ b/bin/ls/ls.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ls.1,v 1.52 2007/05/31 19:19:15 jmc Exp $
+.\" $OpenBSD: ls.1,v 1.53 2008/09/04 15:44:41 jmc Exp $
.\" $NetBSD: ls.1,v 1.14 1995/12/05 02:44:01 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
@@ -33,7 +33,7 @@
.\"
.\" @(#)ls.1 8.7 (Berkeley) 7/29/94
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: September 4 2008 $
.Dt LS 1
.Os
.Sh NAME
@@ -62,6 +62,15 @@ If more than one operand is given,
non-directory operands are displayed first; directory
and non-directory operands are sorted separately and in
lexicographical order.
+By default,
+.Nm
+lists one entry per line to standard
+output; the exceptions are to terminals or when the
+.Fl C ,
+.Fl m ,
+or
+.Fl x
+options are specified.
.Pp
The options are as follows:
.Bl -tag -width Ds
@@ -113,9 +122,19 @@ after each that is a FIFO.
.It Fl f
Output is not sorted.
.It Fl g
-The same as
+List in long format as in
.Fl l ,
except that the owner is not printed.
+The output of
+.Fl gn
+and
+.Fl ng
+is identical:
+a long listing with numerical group ID,
+and no numerical user ID.
+.Fl g
+is always overridden by
+.Fl l .
.It Fl h
When used with a long format
option, use unit suffixes: Byte, Kilobyte, Megabyte, Gigabyte, Terabyte,
@@ -149,6 +168,19 @@ Stream output format; list files across the page, separated by commas.
List in long format as in
.Fl l ,
but retain user and group IDs in a numeric format.
+The output of
+.Fl gn
+and
+.Fl ng
+is identical:
+a long listing with numerical group ID,
+and no numerical user ID.
+The output of
+.Fl ln
+and
+.Fl \&nl
+is identical:
+a long listing with numerical group and user ID.
.It Fl o
Include the file flags in a long format
.Pf ( Fl g , l ,
@@ -204,52 +236,42 @@ or
Multi-column output sorted across the page rather than down the page.
.El
.Pp
-The
+It is not an error to specify more than one of
+the following mutually exclusive options:
.Fl 1 ,
.Fl C ,
.Fl g ,
.Fl l ,
+.Fl m ,
+.Fl n ,
and
-.Fl n
-options all override each other; the last one specified determines
-the format used with the exception that if both
-.Fl l
+.Fl x ;
+.Fl c ,
+.Fl S ,
+.Fl t ,
and
-.Fl g
-are specified,
+.Fl u ;
+.Fl k
+and
+.Fl h .
+Where more than one option is specified from the same
+mutually exclusive group,
+the last option given overrides the others,
+except that
.Fl l
-will always override
-.Fl g .
-.Pp
-The
-.Fl c
+always overrides
+.Fl g ;
+.Fl k
+always overides
+.Fl h ;
and
-.Fl u
-options override each other; the last one specified determines
-the file time used.
-The
.Fl f
-option overrides any occurrence of either.
-.Pp
-By default,
-.Nm
-lists one entry per line to standard
-output; the exceptions are to terminals or when the
-.Fl C ,
-.Fl m ,
-or
-.Fl x
-options are specified.
-.Pp
-File information is displayed with one or more
-.Ao blank Ac Ns s
-separating the information associated with the
-.Fl i ,
-.Fl s ,
-.Fl l ,
+always overrides
+.Fl c ,
+.Fl S ,
+.Fl t ,
and
-.Fl n
-options.
+.Fl u .
.Ss The Long Format
If the
.Fl g ,