The DIRECTORY command lists the files contained in a directory. When you use certain qualifiers with the command, additional information is displayed, along with the names of the files. The output of the DIRECTORY command depends on certain formatting qualifiers and their defaults. These qualifiers are: /COLUMNS, /DATE, /FULL, /OWNER, /PROTECTION, and /SIZE. In studying the qualifiers and the capabilities they offer, watch for qualifiers that override other qualifiers. For example, if you specify the /FULL format, the system cannot display all the information in more than one column. Thus, if you specify both /COLUMNS and /FULL, the number of columns you requested is ignored. Format: DIRECTORY [file-spec[,...]] Additional information available: ALL BEFORE BRIEF COLUMN CONTROL CREATED DATE DETACH EXPIRED FID FILEID FORMAT FORMFEED FULL GRANDTOTAL HEADING HELP MODIFIED OUTPUT OWNER PARAMETERS PRINTER PROTECTION REWIND REVISED QUALIFIERS SINCE SIZE SPOOL STARTUP TODAY TOTAL TRAILING VERSION 2 QUALIFIERS Command Qualifiers Defaults /[NO]ALL See text. /BEFORE /BEFORE=TODAY /BRIEF None. /COLUMNS=n /COLUMNS=4 /CREATED /CREATED /[NO]DATE=[option] /DATE /DETACH See text. /EXPIRED /CREATED /FID None. /FILEID None. /FORMAT None. /FORMFEED None. /FULL None. /GRANDTOTAL None. /[NO]HEADING /HEADING /HELP None. /MODIFIED /CREATED /OUTPUT=file-spec See text. /OWNER /NOOWNER /PRINTER See text. /PROTECTION /NOPROTECTION /REWIND /NOREWIND /REVISED None. /[NO]SIZE=[option] /SIZE=USED /SINCE /SINCE=TODAY /SPOOL None. /TOTAL None. /[NO]TRAILING /TRAILING /VERSION None. The default qualifiers are: /SIZE=USED/DATE=CREATED 2 PARAMETERS file-spec[,...] Specifies one or more files to be listed. The syntax of a file specification determines what file(s) will be listed, as follows: o If you do not enter a file specification, the DIRECTORY command lists all versions of the files in your current default directory. o If you specify only a device name, the DIRECTORY command uses your default directory specification. o If the file name, file type or version number is not included in the file specification, the DIRECTORY command assumes the asterisk (*) wildcard for missing fields. If you specify more than one file, separate the file specifications with commas (,). The command line length can be up to 132 characters long. The continuation character ("-") can be used to input long command lines if you use the RUN command to start DIRECTORY (See "STARTUP" section). Full wildcarding is permitted for any part of the file specification. Examples: >run $dir File(s): l*.log Directory DB0:[263,75] LOCKED.LOG;1 *** LOCKED *** 28-FEB-1985 08:31 LRS100.LOG;1 11 25-FEB-1985 08:52 Total of 2 files, 11/11 blocks used/allocated. File(s): ^Z >dir [1,6] Directory DB0:[1,6] ERRLOG.ULB;1 732 02-FEB-1984 10:50 ERRLOGETC.ULB;1 83 05-MAY-1983 18:34 LOG.SAV;1 Privilege violation BACKUP.ERR;1 3 20-NOV-1984 17:02 LOG.ERR;1 2 01-MAR-1985 00:07 ACNTRN.SYS;116 Privilege violation SYSSCAN.TMP;2 2 01-MAR-1985 13:01 Total of 5 files, 822/827 blocks used/allocated. 2 CONTROL There are two control characters used to control the action of the DIRECTORY program. The terminal must be attached for DIRECTORY to detect these control characters. This is the default unless the /DETACH qualifier is specified. When you are listing multiple directories, typing a CTRL/O tells DIRECTORY to skip to the next directory. When you want to abort the current listing type CTRL/C. If DIRECTORY does not abort after typing the first CTRL/C, typing CTRL/C a second time invokes the MCR or DCL command interpreter. You can then abort DIRECTORY if desired. I've had to abort DIRECTORY when searching for files on a magtape since the operation could not be aborted. The totals displayed for the current directory is only for the files displayed before typing either CTRL/C or CTRL/O. Note: These control characters do not function when using DIRECTORY through DECNET from a VAX/VMS system. 2 ALL /ALL /ALL /NOALL (D) /ALL is equivalent to /SIZE=ALL/DATE=CREATED/OWNER/PROTECTION This quailifier is used to list all by favorite options. This qualifier is used to simply save some typing. This qualifier can also be negated to provide a quick method of disabling the default /SIZE=USED/DATE=CREATED qualifiers. Example: >dir dir.*/all Directory DB0:[263,75] DIR.CMD;11 9/9 26-FEB-1985 10:01 [263,070] [RWE,RWE,RWE,R] DIR.HLP;1 24/24 28-FEB-1985 16:08 [263,070] [RWE,RWE,RWE,R] DIR.MAC;1 42/42 28-FEB-1985 08:35 [263,070] [RWE,RWE,RWE,R] DIR.MAP;134 49/49 28-FEB-1985 12:16 [263,070] [RWED,RWED,RWED,R] DIR.OLB;10 80/80 28-FEB-1985 14:21 [263,070] [RWED,RWED,RWED,R] DIR.TSK;134 57/57 28-FEB-1985 12:15 [263,070] [RWED,RWED,RWED,R] Total of 6 files, 261/261 blocks used/allocated. 2 BEFORE /BEFORE /BEFORE[=date [time]] Specifies that only those files dated earlier than a particular time be printed. The date/time format is: dd-mmm-[cc]yy [hh:mm] Where: dd = the day, mmm = the month, cc = the century, yyyy = the year, hh = the hour, mm = the minutes. If the hour and minutes isn't specified, the default is 00:00. You can also specify of the following options: TODAY For today's date. MONTH For the start of this month. YEAR For the start of this year. YESTERDAY For yesterday's date. This qualifier is normally used in conjunction with one of the following qualifiers: /CREATED, /EXPIRED, or /MODIFIED. The default is /CREATED/BEFORE=TODAY. Example: >dir /before=year Directory DB0:[263,75] ASCR50.MAC;1 10 31-AUG-1984 15:28 EDTINI.EDT;1 1 17-AUG-1984 11:35 FCSPRE.MAC;1 1 31-AUG-1984 16:21 PARSFN.MAC;1 29 31-AUG-1984 17:11 RSXMSG.MAC;1 45 28-AUG-1984 09:53 Total of 5 files, 86/86 blocks used/allocated. 2 BRIEF /BRIEF Includes only the file name, type, and version number of each file to be listed. The /BRIEF qualifier is overridden whenever any of the following formatting qualifiers is specified: /SIZE, /DATE, /OWNER, /PROTECTION, /NOHEADING, or /FULL. Example: >dir *.mac/brief Directory DB0:[263,75] ASCR50.MAC;1 DIR.MAC;1 DIRBUF.MAC;1 DIRERR.MAC;1 DIRFDB.MAC;1 DIRFMT.MAC;1 DIRHDR.MAC;1 DIRHLP.MAC;1 DIRIO.MAC;1 DIRNAM.MAC;1 DIROPE.MAC;1 DIRPAR.MAC;1 DIRPRE.MAC;1 DIRSUB.MAC;1 DIRTBL.MAC;1 DIRUTL.MAC;1 DIRVER.MAC;1 FCSPRE.MAC;1 PARSE.MAC;1 PARSFN.MAC;1 RSXMSG.MAC;1 Total of 21 files. 2 COLUMN /COLUMN /COLUMN=n Lists the files using the specified number of columns on each line of the display. By default, the number of columns is four if the terminal width is less than or equal to eighty characters, otherwise the default is six columns. Valid for /BRIEF format only. Example: >dir *.mac/columns=3/brief Directory DB0:[263,75] ASCR50.MAC;1 DIR.MAC;1 DIRBUF.MAC;1 DIRERR.MAC;1 DIRFDB.MAC;1 DIRFMT.MAC;1 DIRHDR.MAC;1 DIRHLP.MAC;1 DIRIO.MAC;1 DIRNAM.MAC;1 DIROPE.MAC;1 DIRPAR.MAC;1 DIRPRE.MAC;1 DIRSUB.MAC;1 DIRTBL.MAC;1 DIRUTL.MAC;1 DIRVER.MAC;1 FCSPRE.MAC;1 PARSE.MAC;1 PARSFN.MAC;1 RSXMSG.MAC;1 Total of 21 files. 2 CREATED /CREATED Selects the files according to their date of creation. This qualifier is relevant only when used with the /BEFORE or /SINCE qualifier, and should not be used with the /EXPIRED or /MODIFIED qualifier. /CREATED is the default for /BEFORE or /SINCE. 2 DATE /DATE /DATE[=option] /DATE=CREATED (D) Includes the creation, expiration, or date last written for each file listed. If you specify /DATE without an option, CREATED is assumed. The options are: CREATED Lists the creation date EXPIRED Lists the expiration date MODIFIED Lists the last date the file was written ALL Lists all three file dates shown above Examples: >dir dir.*/nosize/date=all Directory DB0:[263,75] DIR.CMD;11 26-FEB-1985 10:01 26-FEB-1985 10:01 DIR.HLP;1 28-FEB-1985 16:08 28-FEB-1985 16:08 DIR.MAC;1 28-FEB-1985 08:35 28-FEB-1985 08:35 DIR.MAP;134 28-FEB-1985 12:16 28-FEB-1985 12:17 DIR.OLB;10 28-FEB-1985 14:21 28-FEB-1985 14:22 DIR.TSK;134 28-FEB-1985 12:15 28-FEB-1985 12:16 Total of 6 files, 261/261 blocks used/allocated. >dir dir.*/date=all/size/date/owner/protection Directory DB0:[263,75] DIR.CMD;11 9/9 [263,070] [RWE,RWE,RWE,R] 26-FEB-1985 10:01 26-FEB-1985 10:01 DIR.HLP;1 24/24 [263,070] [RWE,RWE,RWE,R] 28-FEB-1985 16:08 28-FEB-1985 16:08 DIR.MAC;1 42/42 [263,070] [RWE,RWE,RWE,R] 28-FEB-1985 08:35 28-FEB-1985 08:35 DIR.MAP;134 49/49 [263,070] [RWED,RWED,RWED,R] 28-FEB-1985 12:16 28-FEB-1985 12:17 DIR.OLB;10 80/80 [263,070] [RWED,RWED,RWED,R] 28-FEB-1985 14:21 28-FEB-1985 14:22 DIR.TSK;134 57/57 [263,070] [RWED,RWED,RWED,R] 28-FEB-1985 12:15 28-FEB-1985 12:16 Total of 6 files, 261/261 blocks used/allocated. 2 DETACH /DETACH Controls whether the terminal is detached for files are listed. By default, the terminal of only detached if the output is directed to the line printer or an output file. The terminal is normally attached when listing to the terminal so the CTRL/C and CTRL/O control functions can be detected by DIRECTORY. 2 EXPIRED /EXPIRED Selects files according to the planned expiration date for each file. This qualifier is relevant only with the /BEFORE or /SINCE qualifiers, and should not be used with the /CREATED or /MODIFIED qualifiers. Example: >dir/since/expired No files found. 2 FID /FID /FID=(fid1,fid2,fid3) or /FID:fid1:fid2 /NOFID (D) This qualifier causes DIRECTORY to select a file by its' file ID. The file ID is compared against each selected file looking for a match. By default, only the current directory is searched. If the directory of the file ID isn't known, you must specify [*] to have all directories searched. Example: >dir [*]/fid=(112,1) Directory DB0:[1,6] ERRLOGETC.ULB;1 83 05-MAY-1983 18:34 Total of 1 file, 83/83 blocks used/allocated. 2 FILEID /FILEID /FILEID /NOFILEID (D) Controls whether the file identification of the file is displayed. By default, DIRECTORY does not display the file identification, except in the /FULL display. Example: >dir dir.cmd/-all/fileid Directory DB0:[263,75] DIR.CMD;11 (7566,115,0) Total of 1 file, 9/9 blocks used/allocated. 2 FORMAT /FORMAT="format string" This qualifier allows you to specify a string to specify how the output should be formatted. This is useful for when you want to create command files for other utilities. The following special characters are used to substitute portions of the file name into the format string: Symbol Description Expanded String ------ ----------------------- ---------------------- $F The expanded file name. dduu:[uic]name.typ;ver $D The device name field. dduu: $N The file name field. name $T The file type field. .typ $U The file UIC field. [uic] $V The file version field. ;ver For example, to create a MACRO-11 command file to assemble all the DIRECTORY sources use the following command line: >dir d*.mac;0/format="$n,$n/-sp/cr=dirpre/pa:1,$f"/output=dirasm.cmd >type dirasm.cmd DIR,DIR/-sp/cr=dirpre/pa:1,DB0:[263,75]DIR.MAC;5 DIRBUF,DIRBUF/-sp/cr=dirpre/pa:1,DB0:[263,75]DIRBUF.MAC;6 . . . DIRUTL,DIRUTL/-sp/cr=dirpre/pa:1,DB0:[263,75]DIRUTL.MAC;6 DIRVER,DIRVER/-sp/cr=dirpre/pa:1,DB0:[263,75]DIRVER.MAC;2 >mac @dirasm The version number specified ";0" causes DIRECTORY to only use the highest version of each source file in the directory. 2 FORMFEED /FORMFEED or /FF This qualifier controls whether formfeeds proceed each new UIC in the directory listing. This may be useful when the listing is directed to the line printer using the /PRINTER qualifier. 2 FULL /FULL Lists full file attributes with each file. For ANSI magtapes, the block size is also displayed. The /FULL qualifier overrides all other formats specified. Example: >dir dir.olb/full Directory DB0:[263,75] File name: DIR.OLB;10 File ID: (2207,261,0) Size: 80/80 Owner: [263,070] Created: 28-FEB-1985 14:21 Revised: 28-FEB-1985 14:22 (2) Expires: File organization: Sequential File attributes: Allocation: 80, Extend: 0 Characteristics: Contiguous Record format: Fixed, longest record is 512 bytes Record attributes: No carriage control Protection: System: RWED, Owner: RWED, Group: RWED, World: R Total of 1 file, 80/80 blocks used/allocated. 2 GRANDTOTAL /GRANDTOTAL Suppresses both the per-directory total and the individual file information. /GRANDTOTAL displays only the total line for all files and directories that have been selected. (See the /TRAILING quailifier for information on displaying directory totals.) Example: >dir db1:[200,*]/grandtotal Grand total of 2 directories, 5 files, 55/99 blocks. 2 HEADING /HEADING /HEADING (D) /NOHEADING Controls whether heading lines consisting of a device description and directory specification are printed. When you specify /NOHEADING, the output appears in single column format with the full file specification on every file. Examples: >dir dir.cmd/noheading DB0:[263,75]DIR.CMD;11 9 26-FEB-1985 10:01 Total of 1 file, 9/9 blocks used/allocated. >dir dir.cmd/noheading/notrailing DB0:[263,75]DIR.CMD;11 9 26-FEB-1985 10:01 2 HELP /HELP The /HELP qualifier or "?" can be used to display this help text. 2 MODIFIED /MODIFIED Selects files according to the last date the file was modified. This qualifier is relevant only with the /BEFORE or /SINCE qualifier, and should not be used with the /CREATED or /EXPIRED qualifier. 2 OUTPUT /OUTPUT /OUTPUT[=file-spec] Requests that the DIRECTORY command output be written to the file specified rather than to the current terminal. If you specify the /OUTPUT qualifier without a file specification, the output is directed to SY0:[current_uic]DIRECTORY.LST. Examples: >dir /output >dir directory.lst Directory DB0:[263,75] DIRECTORY.LST;1 4 28-FEB-1985 16:15 Total of 1 file, 4/4 blocks used/allocated. >del directory.lst;1 >dir /output=test >dir test.lst Directory DB0:[263,75] TEST.LST;1 4 28-FEB-1985 16:16 Total of 1 file, 4/4 blocks used/allocated. >del test.lst;1 2 OWNER /OWNER /OWNER /NOOWNER (D) Controls whether the file's owner UIC is listed. Example: >dir dir.*/nosize/nodate/owner Directory DB0:[263,75] DIR.CMD;11 [263,070] DIR.HLP;1 [263,070] DIR.MAC;1 [263,070] DIR.MAP;134 [263,070] DIR.OLB;10 [263,070] DIR.TSK;134 [263,070] DIR.HLP;2 [263,070] Total of 7 files, 312/312 blocks used/allocated. 2 PRINTER /PRINTER Queues the command output for printing under the name given by the /OUTPUT qualifier. If you specify /PRINTER without the /OUTPUT qualifier, the output is directed written directly to the line printer using the transparent spooling feature of the operating system. These files are deleted after being printed. Example: >dir/printer/brief >shq ** PRINT QUEUES ** PRINT => LP0 LP0 => LP0 [263,70] DIRT13 ENTRY:909 FORM:0 ACTIVE ON LP0 PRI:50 LEN:0 PAGE:0 NORESTART FLAG:JOB NOLOWER COP:1 > 1 DB0: FID:(1565,570) COP:1 DELETE FTSQUE => FTSDEQ 2 PROTECTION /PROTECTION /PROTECTION /NOPROTECTION (D) Controls whether the file protection for each file is listed. Example: >dir dir.*/noall/protection Directory DB0:[263,75] DIR.CMD;11 [RWE,RWE,RWE,R] DIR.HLP;1 [RWE,RWE,RWE,R] DIR.MAC;1 [RWE,RWE,RWE,R] DIR.MAP;134 [RWED,RWED,RWED,R] DIR.OLB;10 [RWED,RWED,RWED,R] DIR.TSK;134 [RWED,RWED,RWED,R] DIR.HLP;2 [RWE,RWE,RWE,R] Total of 7 files, 312/312 blocks used/allocated. 2 REWIND /REWIND This qualifier causes a rewind of the magtape before starting the directory of the tape. 2 REVISED /REVISED Selects files according to the last date the file was revised. This qualifier is relevant only with the /BEFORE or /SINCE qualifier, and should not be used with the /CREATED or /EXPIRED qualifier. This qualifier is the same as /MODIFIED. 2 SINCE /SINCE /SINCE[=date [time]] Specifies that only those files dated after a specified time be printed. The date/time format is: dd-mmm-[cc]yy [hh:mm] Where: dd = the day, mmm = the month, cc = the century, yyyy = the year, hh = the hour, mm = the minutes. If the hour and minutes isn't specified, the default is 00:00. You can also specify of the following options: TODAY For today's date. MONTH For the start of this month. YEAR For the start of this year. YESTERDAY For yesterday's date. This qualifier is normally used in conjunction with one of the following qualifiers: /CREATED, /EXPIRED, or /MODIFIED. The default is /CREATED/SINCE=TODAY. Example: >dir .mac/since=yesterday Directory DB0:[263,75] DIR.MAC;1 42 01-MAR-1985 08:50 DIRBUF.MAC;1 9 01-MAR-1985 08:55 DIRERR.MAC;1 15 28-FEB-1985 08:45 DIRFMT.MAC;1 32 28-FEB-1985 11:11 DIRHDR.MAC;1 42 01-MAR-1985 11:27 DIRIO.MAC;1 13 28-FEB-1985 09:12 DIROPE.MAC;1 33 01-MAR-1985 11:12 DIRPAR.MAC;1 46 01-MAR-1985 09:44 DIRVER.MAC;1 3 01-MAR-1985 10:29 Total of 9 files, 235/235 blocks used/allocated. 2 SIZE /SIZE /SIZE[=option] /SIZE=USED (D) Provides the file size in blocks used and/or allocated for each file listed, according to the option you specify. If you specify /SIZE without an option, the ALL option is assumed. The options you can specify are: ALLOCATION Lists the file size in blocks allocated USED Lists the file size in blocks used ALL Lists both blocks used and allocated Example: >dir dir.*/nodate/size Directory DB0:[263,75] DIR.CMD;11 9/9 DIR.HLP;1 37/37 DIR.MAC;1 42/42 DIR.MAP;134 49/49 DIR.OLB;10 80/80 DIR.TSK;134 57/57 DIR.HLP;2 38/38 Total of 7 files, 312/312 blocks used/allocated. 2 SPOOL /SPOOL /SPOOL /NOSPOOL (D) This qualifier controls whether the output file is spooled automatically to the line printer when the output is directed to an output file. 2 STARTUP There are two methods of starting DIRECTORY; they are: 1. > RUN $DIR File(s): This is the interactive mode. DIR continues to prompt for input until end of file (CTRL/Z) is encountered to exit. The length of the command lines can be up to a maximum of 132 characters. The continuation character "-" is allowed at the end of a line. If command file input is used "@", and the extension isn't specified the default is .CMD. 2. > DIR command_line DIR processes the specified command line and then exits. Command lines are of the form: input_file1,input_file2, ... input_filen/switches 2 TODAY /TODAY Specifies that only those files dated today are to be listed. This qualifier is normally used in conjunction with one of the following qualifiers: /CREATED, /EXPIRED, or /MODIFIED. The default is /CREATED/TODAY. Example: >dir/today/brief Directory DB0:[263,75] DIR.HLP;1 DIR.MAC;1 DIR.MAP;134 DIR.OLB;10 DIR.TSK;134 DIRERR.MAC;1 DIRFMT.MAC;1 DIRHDR.MAC;1 DIRIO.MAC;1 DIRPAR.MAC;1 DIRVER.MAC;1 LOCKED.LOG;1 Total of 12 files. 2 TOTAL /TOTAL Inhibits the listing of all individual file information and prints only the trailing lines as described under the /TRAILING qualifier. Example: >dir /total Directory DB0:[263,75] Total of 30 files, 683/683 blocks used/allocated. 2 TRAILING /TRAILING /TRAILING (D) /NOTRAILING Controls whether trailing lines that summarize the following information are output: o Number of files listed. o Total number of blocks used per directory. o Total number of blocks allocated. o Total number of directories and total blocks used and/or allocated in all directories (only if more than one directory is listed). By default, the output format includes most of this summary information. Any qualifier which requires the reading of the file header (i.e., /DATE/SIZE/PROTECTION/OWNER or /FULL) causes the number of blocks used/allocated to be displayed. Example: >dir dir.cmd/notrailing Directory DB0:[263,75] DIR.CMD;11 9 26-FEB-1985 10:01 2 VERSION /VERSION Displays the current version of the DIRECTORY program. Example: >dir /version Directory Version 2.0 - April 11, 1985 - by Robin Miller.