4.3BSD-Reno/share/man/cat1/ls.0
LS(1) UNIX Programmer's Manual LS(1)
NNAAMMEE
ls - list contents of directory
SSYYNNOOPPSSIISS
llss [ --11AAaaCCccddFFffggiikkLLllqqRRrrssttuu ] [ file ... ]
DDEESSCCRRIIPPTTIIOONN
For each directory argument, _l_s lists the contents of the
directory; for each file argument, _l_s repeats its name and
any other information requested. By default, the output is
sorted alphabetically. When no argument is given, the
current directory is listed. When several arguments are
given, the arguments are first sorted appropriately, but
file arguments are processed before directories and their
contents.
The options are as follows:
--11 force one entry per line output format; this is the
default when output is not to a terminal.
--AA List all entries except for ``.'' and ``..''. Always
set for the super-user.
--aa List all entries; in the absence of this option,
entries whose names begin with a period (..) are _n_o_t
listed.
--CC force multi-column output; this is the default when
output is to a terminal.
--cc Use time when file status was last changed for sorting
or printing.
--dd If argument is a directory, list only its name; often
used with --ll to get the status of a directory.
--ff Don't sort the output.
--FF cause directories to be marked with a trailing `/',
sockets with a trailing `=', symbolic links with a
trailing `@', and executable files with a trailing `*'.
--gg Include the group ownership of the file in a long out-
put.
--ii For each file, print the i-number in the first column
of the report.
--kk Modifies the -_s option, causing the sizes to be
reported in kilobytes.
Printed 7/27/90 1Q 1
LS(1) UNIX Programmer's Manual LS(1)
--LL If argument is a symbolic link, list the file or direc-
tory the link references rather than the link itself.
--ll List in long format, giving type and mode (in the for-
mat described by _s_t_r_m_o_d_e(3)), number of links, owner,
size in bytes, and time of last modification for each
file. If the file is a special file the size field
will instead contain the major and minor device
numbers. If the file is a symbolic link the pathname
of the linked-to file is printed preceded by ``->''.
--qq force printing of non-graphic characters in file names
as the character `?'; this is the default when output
is to a terminal.
--RR recursively list subdirectories encountered.
--rr Reverse the order of sort to get reverse alphabetic or
oldest first as appropriate.
--ss Display the sizes of files and directories in 512-byte
blocks.
--tt Sort by time modified (latest first) instead of by
name.
--uu Use time of last access instead of last modification
for sorting (with the --tt option) and/or printing (with
the --ll option).
The -_1, -_C, and -_l options all override each other; the last
one specified determines the format used.
The -_c, and -_u options override each other; the last one
specified determines the file time used.
When the sizes of the files in a directory are listed, a
total count of blocks, including indirect blocks is printed.
FFIILLEESS
/etc/passwd to get user id's for `ls -l'.
/etc/group to get group id's for `ls -g'.
BBUUGGSS
The option setting based on whether the output is a teletype
is undesirable as ``ls -s'' is much different than
``ls -s | lpr''. On the other hand, not doing this setting
would make old shell scripts which used _l_s almost certain
losers.
Printed 7/27/90 2Q 2