summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Campbell <aaron@cvs.openbsd.org>1999-05-23 20:15:49 +0000
committerAaron Campbell <aaron@cvs.openbsd.org>1999-05-23 20:15:49 +0000
commitf1028c07520e83546d25510b0be2ff537e852460 (patch)
tree1b023cf4c485f4149e27a8eb0a5ed23691d34090
parent9727548f482a2ae8277f0cc37308c02d369a8d59 (diff)
improve; kwesterback@home.com, myself
-rw-r--r--bin/ls/ls.1129
1 files changed, 80 insertions, 49 deletions
diff --git a/bin/ls/ls.1 b/bin/ls/ls.1
index d59203466f9..d14235508ec 100644
--- a/bin/ls/ls.1
+++ b/bin/ls/ls.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: ls.1,v 1.16 1999/05/03 16:27:12 espie Exp $
+.\" $OpenBSD: ls.1,v 1.17 1999/05/23 20:15:48 aaron Exp $
.\" $NetBSD: ls.1,v 1.14 1995/12/05 02:44:01 jtc Exp $
.\"
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
@@ -109,7 +109,10 @@ Recursively list subdirectories encountered.
Sort by size, largest file first.
.It Fl T
Display complete time information for the file, including
-month, day, hour, minute, second, and year.
+month, day, hour, minute, second, and year. This option has no effect unless
+one of the long format
+.Pq Fl l , Fl n
+options is also specified.
.It Fl W
Display whiteouts when scanning directories.
.It Fl a
@@ -117,7 +120,11 @@ Include directory entries whose names begin with a
dot
.Pq Sq \&. .
.It Fl c
-Use time when file status was last changed for sorting or printing.
+Use time file's status was last changed instead of last modification
+time for sorting
+.Pq Fl t
+or printing
+.Pq Fl l , Fl n .
.It Fl d
Directories are listed as plain files (not searched recursively) and
symbolic links in the argument list are not indirected through.
@@ -127,16 +134,19 @@ Output is not sorted.
Does nothing; kept for compatibility with older versions of
.Xr ls 1 .
.It Fl i
-For each file, print the file's file serial number (inode number).
+For each file, print its inode number.
.It Fl k
Modifies the
.Fl s
-option, causing the sizes to be reported in kilobytes.
+option, causing the sizes to be reported in kilobytes. Overrides any
+value specified by the
+.Ev BLOCKSIZE
+environment variable.
.It Fl l
(The lowercase letter
.Dq ell. Ns )
-List in long format. (See below.)
-If the output is to a terminal, a total sum for all the file
+List in long format (see below).
+If the output is to a terminal, a total sum of all file
sizes is output on a line before the long listing.
.It Fl m
Stream output format; list files across the page, separated by commas.
@@ -145,11 +155,13 @@ List in long format as in
.Fl l ,
but retain user and group IDs in a numeric format.
.It Fl o
-Include the file flags in a long
-.Pq Fl l
+Include the file flags in a long format
+.Pq Fl l , Fl n
output.
.It Fl p
-Display a slash (/) immediately after each pathname that is a directory.
+Display a slash
+.Pq Sq \&/
+immediately after each pathname that is a directory.
.It Fl q
Force printing of non-graphic characters in file names as
the character
@@ -159,29 +171,32 @@ this is the default when output is to a terminal.
Reverse the order of the sort to get reverse
lexicographical order or the smallest or oldest entries first.
.It Fl s
-Display the number of file system blocks actually used by each file, in units
-of 512 bytes, where partial units are rounded up to the next integer value.
-If the output is to a terminal, a total sum for all the file
-sizes is output on a line before the listing.
+Display the number of file system blocks actually used by each file,
+where partial units are rounded up to the next integer value. Blocks
+are 512 bytes unless overridden by the
+.Fl k
+flag or
+.Ev BLOCKSIZE
+environment variable.
.It Fl t
Sort by time modified (most recently modified
-first) before sorting the operands by lexicographical
+first) before sorting the operands in lexicographical
order.
.It Fl u
-Use time of last access,
-instead of last modification
-of the file for sorting
+Use file's last access time
+instead of last modification time
+for sorting
.Pq Fl t
or printing
-.Pq Fl l .
+.Pq Fl l , Fl n .
+.It Fl x
+Multi-column output sorted across the page rather than down the page.
.It Fl \&1
(The numeric digit
.Dq one. Ns )
Force output to be one entry per line.
This is the default when
output is not to a terminal.
-.It Fl x
-Multi-column output sorted across the page rather than down the page.
.El
.Pp
The
@@ -198,7 +213,9 @@ The
and
.Fl u
options override each other; the last one specified determines
-the file time used.
+the file time used. The
+.Fl f
+option overrides any occurence of either.
.Pp
By default,
.Nm
@@ -224,25 +241,38 @@ or
.Fl n
options are given, the following information
is displayed for each file:
-file mode,
-number of links, owner name, group name,
-number of bytes in the file, abbreviated
-month, day-of-month file was last modified,
-hour file last modified, minute file last
-modified, and the pathname.
-In addition, for each directory whose contents are displayed, the total
-number of 512-byte blocks used by the files in the directory is displayed
-on a line by itself immediately before the information for the files in the
-directory.
+mode,
+number of links,
+owner,
+group,
+size in bytes,
+time of last modification
+.Pq Dq mmm dd HH:MM ,
+and the pathname.
+In addition, for each directory whose contents are displayed, the first
+line displayed is the total number of blocks used by the files in the
+directory. Blocks are 512 bytes unless overridden by the
+.Fl k
+option or
+.Ev BLOCKSIZE
+environment variable.
.Pp
-If the owner or group names are not a known user or group name,
+If the owner or group name is not a known user or group name,
or the
.Fl n
-option is given, the numeric IDs are displayed.
+option is given, the numeric ID is displayed.
.Pp
If the file is a character special or block special file,
the major and minor device numbers for the file are displayed
-in the size field. If the file is a symbolic link, the pathname of the
+in the size field.
+.Pp
+If the
+.Fl T
+option is given, the time of last modification is displayed using the
+format
+.Dq mmm dd HH:MM:SS CCYY .
+.Pp
+If the file is a symbolic link, the pathname of the
linked-to file is preceded by
.Dq \-> .
.Pp
@@ -279,7 +309,8 @@ owner permissions,
group permissions, and
other permissions.
Each field has three character positions:
-.Bl -enum -offset indent
+.Pp
+.Bl -enum -offset indent -compact
.It
If
.Sy r ,
@@ -310,40 +341,40 @@ The file is executable or the directory is
searchable.
.It Sy \-
The file is neither readable, writable, executable,
-nor set-user-ID nor set-group-ID mode, nor sticky. (See below.)
+nor set-user-ID, nor set-group-ID, nor sticky (see below).
.El
.Pp
These next two apply only to the third character in the last group
-(other permissions).
+(other permissions):
.Bl -tag -width 4n -offset indent
.It Sy T
The sticky bit is set
(mode
.Li 1000 ) ,
-but neither executable nor searchable. (See
+but neither executable nor searchable (see
.Xr chmod 1
or
-.Xr sticky 8 . )
+.Xr sticky 8 ) .
.It Sy t
The sticky bit is set (mode
.Li 1000 ) ,
-and is searchable or executable.
-(See
+and is searchable or executable
+(see
.Xr chmod 1
or
-.Xr sticky 8 . )
+.Xr sticky 8 ) .
.El
.El
.Pp
In addition, if the
.Fl o
-option was specified, the file flags (see
+option is specified, the file flags (see
.Xr chflags 1 )
-are displayed as comma-separated strings in front of the file name,
+are displayed as comma-separated strings in front of the file size,
abbreviated as follows:
.Pp
.Bl -tag -width 8n -offset indent -compact
-.It Sy -
+.It \&-
no flags
.It uappnd
user append-only
@@ -386,9 +417,9 @@ The
.Nm
utility calculates how
many pathname text columns to display
-based on the width provided.
-(See
-.Fl C . )
+based on the width provided
+(see
+.Fl C ) .
.It Ev TZ
The timezone to use when displaying dates.
See