HELP PURGE — VMS 4.6
Deletes all but the highest-numbered versions of the specified
files.
Format:
PURGE [file-spec[,...]]
Additional information available:
ParametersCommand QualifiersExamples
Parameters
file-spec[,...] Specifies one or more files to be purged. If you specify two or more files, separate them with either commas or plus signs. If you do not provide a file specification, the PURGE command purges all files in the current default directory. There are no file name or file type defaults with the PURGE command. You cannot specify a version number with any file spec. However, you can use wildcard characters in the directory specification, file name field, or file type field.
Command Qualifiers
Additional information available:
/BACKUP/BEFORE/BY_OWNER/CONFIRM/CREATED/ERASE
/EXCLUDE/EXPIRED/KEEP/LOG/MODIFIED/SINCE
/BACKUP
/BACKUP Selects files according to the dates of their most recent backup. This qualifier is relevant only when used with the /BEFORE or /SINCE qualifier. Use of the /BACKUP qualifier is incompatible with /CREATED, /EXPIRED, and /MODIFIED. /CREATED is the default.
/BEFORE
/BEFORE[=time] Selects only those files that are dated before the specified time. You can specify either an absolute time or a combination of absolute and delta times. See Section 2.5 of the VAX/VMS DCL Concepts Manual for complete information on specifying time values. You can also use the keywords TODAY, TOMORROW, and YESTERDAY. If no time is specified, TODAY is assumed.
/BY_OWNER
/BY_OWNER[=uic] Selects one or more files only if their owner user identification code (UIC) matches the specified owner UIC. Specify the UIC using standard UIC format as described in Section 7.1.1 of the VAX/VMS DCL Concepts Manual. If the /BY_OWNER qualifier is specified without a UIC, the UIC of the current process is assumed.
/CONFIRM
/CONFIRM
/NOCONFIRM (default)
Controls whether a request is issued before each individual PURGE
operation to confirm that the operation should be performed on that
file.
When the system issues the prompt, you can issue any of the
following responses:
YES NO QUIT
TRUE FALSE <CTRL/Z>
1 0 ALL
<RET>
You can use any combination of upper- and lowercase letters for word
responses. Word responses can be abbreviated to one or more letters
(for example, T, TR, or TRU for TRUE). Affirmative answers are YES,
TRUE, and 1. Negative answers are NO, FALSE, 0, and <RET>. QUIT or
CTRL/Z indicates that you want to stop processing the command at
that point. When you respond with ALL, the command continues to
process, but no further prompts are given. If you type a response
other than one of those in the list, the prompt will be reissued.
/CREATED
/CREATED (default) Selects files based on their dates of creation. This qualifier is relevant only when used with the /BEFORE or /SINCE qualifier. Use of the /CREATED qualifier is incompatible with /BACKUP, /EXPIRED, and /MODIFIED.
/ERASE
/ERASE /NOERASE (default) When you simply delete a file, the area in which the file was stored is returned to the system for future use. The data that was stored in that location still exists in the system until new data is written over it. With the /ERASE qualifier, the storage location is overwritten with a system specified pattern so that the data no longer exists.
/EXCLUDE
/EXCLUDE=(file-spec[,...]) Any files that match the listed file specifications are excluded from the PURGE operation. If you specify only one file, you can omit the parentheses. The file specification can contain a directory specification. The file specification can contain a directory specification, but you cannot include the device in the file specifications you supply with the /EXCLUDE qualifier. Wildcard characters are supported for file specifications. However, you cannot use relative version numbers to exclude a specific version.
/EXPIRED
/EXPIRED Selects files according to the dates on which they will expire. This qualifier is relevant only when used with the /BEFORE or /SINCE qualifier. Use of the /EXPIRED qualifier is incompatible with /BACKUP, /CREATED, and /MODIFIED. /CREATED is the default.
/KEEP
/KEEP=n Specifies the maximum number of versions of the specified files to be retained in the directory. If you do not include the /KEEP qualifier, all but the highest-numbered version of the specified files are deleted from the directory.
/LOG
/LOG /NOLOG (default) Controls whether the PURGE command displays the file specifications of files as it deletes them.
/MODIFIED
/MODIFIED Selects files according to the dates on which they were last modified. This qualifier is relevant only when used with the /BEFORE or /SINCE qualifier. Use of the /MODIFIED qualifier is incompatible with /BACKUP, /CREATED, and /EXPIRED. /CREATED is the default.
/SINCE
/SINCE[=time] Selects only those files that are dated after the specified time. You can specify either an absolute time or a combination of absolute and delta times. See Section 2.5 of the VAX/VMS DCL Concepts Manual for complete information on specifying time values. You can also use the keywords TODAY, TOMORROW, and YESTERDAY. If no time is specified, TODAY is assumed.
Examples
1. $ PURGE The PURGE command deletes all but the highest-numbered version of all files in the default directory. 2. $ PURGE/KEEP=2 The PURGE command deletes all but the two highest-numbered versions of all the files in the default directory. 3. $ PURGE *.COM The PURGE command deletes all but the highest-numbered version of each file with a file type of COM. 4. $ PURGE/KEEP=3 [WILDER.JOB308]ACCOUNT.COB The PURGE command deletes all but the three highest-numbered versions of the file ACCOUNT.COB in the subdirectory [WILDER.JOB308]. 5. $ PURGE/KEEP=2 TAMPA::DISK1:[EXAMPLE]*.LIS This PURGE command deletes all but the two highest-numbered versions of each file with the file type LIS in the directory EXAMPLE on remote node TAMPA.