10.0;ld (list_directory), revision 1.0, 88/03/21 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]] DESCRIPTION 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 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, ld describes attributes of that file. 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 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 (default) 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 (default) List filenames. If this option is specified, then -ld, -ll, and -ln lose their default status, and must be specified explicitly, if desired. -ll (default) 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 (default) 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 (default) 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 (default) Display header and totals. -nhd Suppress header and totals. -sn (default) Sort entries by name. -nsn Suppress entry sorting. -warn (default) Produce a warning if no wildcard matches are found. -nwarn Suppress warning if no wildcard matches are found. -h[idden] Names the directories "." (the current working directory) and ".." (the parent directory); these always appear first, even when a sort flag is on. 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 88/09/28 17:18 ch1 88/09/28 17:18 ch2 88/09/28 17:19 ch3 88/09/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 unstruct 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. In this example, //victor is the name of a diskless node. $ 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. 5. This example produces an error because the resolution object //behemoth/rkd/foo.dat does not exist. Use the -ent to show attributes of the link itself without trying to resolve it. $ crl foo //behemoth/rkd/foo.dat $ ld foo -ll -lt ?(ld) "foo" - name not found (os/naming server) $ ld foo -ll -lt -ent foo "//behemoth/rkd/foo.dat" 1 entry listed. 6. The following command displays the contents of the working directory and displays attributes of the working directory itself. $ ld . -a Directory "//otis/tstlib/trash": sys type blocks current type uid used length attr rights name file unstruct 1 32 P pgndwrx abc link foo 2 entries, 1 block used. $ 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. SEE ALSO More information is available. Type help datetime For information on date-time syntax