9.5;ld (list_directory), revision 9.5, 86/07/07
LD (LIST_DIRECTORY) -- List contents of a directory.
usage: LD [pathname...] [-LD|-LF|-LL|-LN] [-LT] [-D|-DTC|-DTM|-DTU]
[-CRB d|-CRA d] [-USB d|-USA d]
[-MOB d|-MOA d] [-ENT|-DI]
[[-A | [-ATTR] [-BL] [-LEN] [-R] [-ROOT]
[-ST] [-TU]] [[-SI | [-AB] [-CONC]
[-RT]] [-SC|-SR] [-W n] [-C] [-HD|-NHD]
[-SN|-NSN] [-WARN|-NWARN] {CL}
FORMAT
LD [pathname...] [options]
LD lists the objects in a directory on standard output. It provides a wide
variety of information on the contents of the various objects, depending on
the command options that you select.
ARGUMENTS
pathname
(optional) Specify pathname of the object to be described. The object
may be a directory, a file, or a link. If you specify a
directory, LD describes the files in that directory. If
you specify a file, the attributes of that file are
reported. Multiple pathnames and wildcarding are
permitted. (If they are used, each name is assumed to be a
filename.)
Default if omitted: list contents of working directory
OPTIONS
Default options are indicated by "(D)."
Attributes
-A Display all attributes.
-ATTR Display permanent/immutable/trouble flags.
-BL Display disk blocks used.
-LEN Display current length in bytes.
-R Display your access rights to entries.
-ROOT Display the contents of the replicated root directory
managed by the naming server helper.
-ST Display system object type.
-TU Display type UIDs.
Date and Time
-D Display creation, modified, and last used dates.
-DTC Display date/time created.
-DTM Display date/time last modified.
-DTU Display date/time last used.
Streams
-SI Display all stream header information.
-AB Display streams ASCII/binary flag.
-CONC Display streams object concurrency.
-RT Display streams record type.
Entry Selection
-CRB d Display entries created before date and time "d".
-CRA d Display entries created after date and time "d".
-USB d Display entries used before date and time "d".
-USA d Display entries used after date and time "d".
-MOB d Display entries modified before date and time "d". Same as
old -BE option.
-MOA d Display entries modified after date and time "d". Same as
old -AF option.
-BE d Display entries modified before date and time "d". Obsolete
option: use -MOB.
-AF d Display entries modified after date and time "d". Obsolete
option: use -MOA.
-DI Treat all names as directory names and list the contents of
those directories.
-ENT List attributes of the target object itself. This option
has no effect if the pathname refers to a file. If the
target object is a directory, -ENT causes LD to display
attributes of the directory itself rather than its
contents. If the target object is a link, -ENT causes LD
to display attributes of the link itself rather than trying
to resolve the link and display attributes of the
resolution object. See Example 5 below.
-LD (D) List directory names. If this option is specified, then
-LF, -LL, and -LN lose their default status, and must be
specified explicitly, if desired.
-LF (D) List file names. If this option is specified, then -LD,
-LL, and -LN lose their default status, and must be
specified explicitly, if desired.
-LL (D) List link names. If this option is specified, then -LD,
-LF, and -LN lose their default status, and must be
specified explicitly, if desired.
-LN (D) List diskless node names. If this option is specified,
then -LD, -LF, and -LL lose their default status, and must
be specified explicitly, if desired. Diskless node names
normally appear only when you specify -ROOT, or when you
list the // directory.
-LT Display link resolution names.
Output Control
-SC Sort the output vertically in columns.
-SR (D) Sort the output horizontally in rows.
-W n Adjust the output to be 'n' characters wide. If this
option is omitted, LD automatically adjusts the width of
the output to the size of the transcript pad's window,
unless the command is issued from a dumb terminal or some
other windowless device. In that case, the output defaults
to 80 characters wide if -W is omitted.
-C List entries in a single column, suppress header.
-HD (D) Display header and totals.
-NHD Suppress header and totals.
-SN (D) Sort entries by name.
-NSN Suppress entry sorting.
-WARN (D) Produce a warning if no wildcard matches are found.
-NWARN Suppress warning if no wildcard matches are found.
LD uses the command line parser, and so also accepts the standard command
options with the exception of the query options (-QA, -NQ, -QW). Type HELP CL
for more information.
TIME
The time at which a file is created, modified, or used is accurate within a
certain tolerance. The reported time of creation or modification is correct
within one minute of the actual creation or modification time. The time of
last use is updated only if more than an hour has elapsed since the recorded
time of last use. Hence, the time of last use reported by the LD command may
vary by as much as an hour from the actual time of last use.
EXAMPLES
1. $ ld -a
Directory "/col/users/final1":
sys type blocks current
type uid used length attr rights name
file rec 18 17640 P pndwrx ch1
file rec 18 18428 P pndwrx ch2
file rec 67 67210 P pndwrx ch3
file rec 12 11554 P pndwrx ch4
4 entries, 115 blocks used.
2. $ ld -dtm
Directory "/col/users/final1":
date/time
modified name
82/03/28 17:18 ch1
82/03/28 17:18 ch2
82/03/28 17:19 ch3
82/03/28 17:20 ch4
4 entries, 115 blocks used.
3. $ ld /sys/ins/[a-e]?*.ins.ftn -a
sys type blocks current
type uid used length attr rights name
file rec 1 872 P pndwrx /sys/ins/base.ins.ftn
file rec 2 1274 P pndwrx /sys/ins/cal.ins.ftn
file uasc 20 19966 P pndwrx /sys/ins/core.ins.ftn
file rec 1 738 P pndwrx /sys/ins/ec2.ins.ftn
4 entries listed, 24 blocks used.
4. $ ld //v?* -a
sys type blocks current
type uid used length attr rights name
node //victor
sdir nil 5 5120 P -------rse //visitor
(attributes unavailable) //void
sdir nil 3 3072 P pgn-calrse //vulture
4 entries listed, 8 blocks used.
NOTE: in this example, //victor is the name of a diskless node.
5. $ crl foo //behemoth/rkd/foo.dat
$ ld foo -ll -lt
?(ld) "foo" - name not found (OS/naming server)
{This error occurs because the resolution object
//behemoth/rkd/foo.dat does not exist. Now use -ENT to show
attributes of the link itself without trying to resolve it.}
$ ld foo -ll -lt -ent
foo "//behemoth/rkd/foo.dat"
1 entry listed.
{The following command displays the contents of the working
directory.}
$ ld . -a
Directory "//otis/tstlib/trash":
sys type blocks current
type uid used length attr rights name
file uasc 1 32 P pgndwrx abc
link foo
2 entries, 1 block used.
{Now display attributes of the working directory itself.}
$ ld . -ent -a
sys type blocks current
type uid used length attr rights name
dir nil 2 2048 P pgndcalrse .
1 entry listed, 2 blocks used.
RELATED TOPICS
More information is available. Type:
- HELP DATETIME
for information on date-time syntax.