The information in this document is subject to ch ange without notice and should not be construed as a commitment by Digi tal Equipment Corporation. Digital Equipment Corporation assumes no responsib ility for any errors that may appear in this manual. The software described in this document is furnished to the purchaser under a license for use on a s ingle computer system and can be copied (with inclusion of DIGITAL's copyright notice) only for use in such system, except as may otherwise be provided in writing by DIGITAL. Digital Equipment Corporation assumes no responsibility f or the use or reliability of its software on equipment that is not suppli ed by DIGITAL. Copyright C 1976 Digital Equipment Corporatio n PAGE 2 SRD---SEARCH DIRECTORY UTILITY SRD is a RSX-11M utility allowin g a U.F.D. sorted into alphabetic order, then outputted to a listing fil e. The format of default listing is such that it can be easily edite d to create an indirect file for PIP, for example, to copy the fi les. The default order on the files is to sort on the type field first , then by name. The name switch "/NAME" causes the sort to be done by name first. Highest version always appears first. The format of the command line is: SRD [OUTFILE=] [UICSPEC] [FILENAME.TYP] [/SW] Note that all fields are optional. Responding to the "SRD>" prompt with a null line (or entering SRD SY: TO MCR) causes the current UFD to be printed in alphabetical order by type first to "TI:". The "OUTFILE" is any file specification in standard RSX format. The defa ults that apply, if an output files spec is given, are: SY0: DIRECTORY.LST;0 If no output spec is given, the default list file is "TI :". "UICSPEC" is the Device and UIC portion of the standard file specification. Wild cards are permitted in any UIC spec. eg: SRD LP:=[100,*]/NA Lists the directory from SY0:[100,*] in o rder by name on the line printer. The "FILENAME.TYPE" may be used to specify a select string, as long as imbedded question marks are not required. An characters not specified are treated as "?". eg: SRD S.O LISTS ALL FILES IN THE CURRENT UIC THAT HAV E "S" AS FIRST CHARACTER IN THE NAME field and have "O" as the first character in the TYPE field. The effect is the same as entering: SRD /SE:S????????.O?? NOTE IF THE SELECT OR SELECTIVE DELETE SWITCH WITH A VALUE IS SPECIFIED THE "FILENAME.TYP" FIELD IS IGNORED. PAGE 3 OPTIONS: There a re a group of switches which allow selection of only certain files f rom the directory. 1. SELECT VERSION: /SV [:n] This swit ch restricts the listing of file names to only the "n" highest versi on. The default value for "n" is 1. 2. DATE: /DA[:DD-MMM-YY] This switch allows selection of files only created on the sp ecified day. If no date is specified, the current date is used. There are two subswitches which may be used for date selection. They are: BEFORE: /BE[:DD-MMM-YY] AFTER: /AF[:DD-MMM-YY] When one of these options ar e used, it causes the listing to included files created before or aft er the specified date as well as those created on the specified date. 3. SELECT /SE: NAME.TYP This switch allows file names t o selected based on a sub-set string match with wild characters. The selection is satisfied if the end of the target field is rea ched without finding a character that does not match. for example: /SE:M The select switch with only an "M" sel ects all files with "M" as the first character in the name reg ardless of the rest of the name. The "*" can be used for clarit y and compatibility with PIP. /SE:M???X.* This option would select any file with a name starting with "M" having any characters in 2nd, 3rd and 4th position, X in 5th po sition. The "*" has the same effect as a null string - matches ever ything. A sub switch to "SE" is "/NE" which causes the file s selected to be those that do not match, ie: /SE:S/NE selects all files that do not start with S. PAGE 4 4. HIGHER OR SAME VERSION - /HV[:n] This switch can be used to cause S RD to list only files that have a version higher or equal to a spe cified value. For example: /HV:10 will cause the listing of files with version 10(octal) or higher only. This is useful in the case where files are copied to an a lternate source, and then edited. SRD will produce a listing of a ny changed files. for example: ; ; CREATE WORK COPY OF MASTER FILES ; PIP DK3:*.*;100=SY:*.* - later - ; SRD DK3:/HV:101 ; ; LIST ALL CHANGED FILES ; NOTE The date option will provide this function only if the edits occur on a different day then the create - o ften not the case. Finally, switches are provided to aid in UFD m aintenance. 5. PURGE - /PU[:n] This option is used to del ete versions of a file older than the "n" most recent. All of th e normal selection options apply. For example: SRD .MA/NE/PU:2 Causes SRD to delete the third of higher versio ns of all files that have type not starting with "MA". 6. SELECTIVE DELETE - /SD [:SELECT STRING] This option causes SRD to list the selected files to the list-file, then read "TI:" and ex amines the first character entered to be a "Y" (upper or lower case). If it is, SRD deletes the file whose name was just listed. Any other response causes SRD to proceed without deleting the fil e. All the previously specified options for selection may be PAGE 5 used, eg: SRD /DA/SD:MAK causes SRD t o select all the files created on the current date with the fir st three characters in the name "MAK" to listed for selective deletio n. The subswitch /DE may be applied to /SD to cause SRD to go ahead and delete all selected files after listing. If the listing is not desired, the -LI switch can be applied. For example: SRD /BE:1-JAN-76/SD/DE will delete all file s created on or before 1-Jan-76. NOTE Entering CTRL/Z will terminate the selection, and return to the Prompt for the next command input. One addi tional switch can be applied to any of the above. That is the full listing, /FU[:n] This causes additional lis ting of: 1. Creation date and time 2. File size - used and allocated (decimal values) 3. File I.D. 4. Owner UIC 5. Protection One final option is provid ed. this causes SRD to write the directory back in the order specif ied. This not only orders the directory, but compresses it. This re duces search time by FCP if the directory has had a lot of files del eted. eg: SRD [100,101]/-LI/WB/NA Causes SRD to read, the directory [100,101], sort the direc tory by name, then write it back without generating a listing. Wri te Access to the directory is required and Write Failure is usua lly due to a protection violation. PAGE 6 Appendix A Summary of SRD Switches /NA[ME].....................Sort by name, rather than type, first. /SV [:N].....................Select only highest "n" version for listing. /DA[TE][:DD-MMM-YY].........Select only file c reated on specified date. /BE[FORE][:D D-MMM-YY].......Select only files created before specified date. /AF[TER][:DD-MMM-YY]........Select only files created after specified date. /SE[ LECT]:NAME.TYP..........Select only files that match sub-string name and type. /NE[GATE]...................Ne gate the selection mode by "Select" switch. /HV[:N].....................Select only files with version higher or same as "n". /PU[RGE][:N]................De lete all but the "n" most recent version of file selected. /SD [:SELECT STRING]........Selectively (using any above sw) list files for deletion. /DE [LETE]..............Sub-switch to /SD - cause deletion of selected files without questioning. /LI[ST]................. ....List the directory, default is true (ie:list). the switch may be negated if n o listing desired. /FU[LL][:N].................Create more complete list ing. /WB.........................Write directory back in sorted form.