VMS Help
PURGE

 *Conan The Librarian (sorry for the slow response - running on an old VAX)

    Deletes all but the highest numbered versions of the specified
    files.

    Format

      PURGE  [filespec[,...]]

  1 - Parameter

 filespec[,...]

    Specifies one or more files to be purged. If you specify more
    than one file, separate the file specifications with either
    commas (,)  or plus signs (+). The asterisk (*)  and the percent
    sign (%)  wildcard characters are allowed in the directory, file
    name, and file type fields; however, no version number can be
    specified. As a default, the PURGE command purges all files
    in the current directory. There are no file name or file type
    defaults with the PURGE command.

  2 - Qualifiers

 2.1 - /BACKUP

    Modifies the time value specified with the /BEFORE or the
    /SINCE qualifier. The /BACKUP qualifier selects files according
    to the dates of their most recent backups. This qualifier
    is incompatible with the /CREATED, /EXPIRED, and /MODIFIED
    qualifiers, which also allow you to select files according
    to time attributes. If you specify none of these four time
    qualifiers, the default is the /CREATED qualifier.

 2.2 - /BEFORE

       /BEFORE[=time]

    Selects only those files dated prior to the specified time. You
    can specify time as absolute time, as a combination of absolute
    and delta times, or as one of the following keywords: BOOT,
    LOGIN, TODAY (default), TOMORROW, or YESTERDAY. Specify one of
    the following qualifiers with the /BEFORE qualifier to indicate
    the time attribute to be used as the basis for selection:
    /BACKUP, /CREATED (default), /EXPIRED, or /MODIFIED.

    For complete information on specifying time values, refer to the
    OpenVMS User's Manual or the online help topic DCL_Tips (subtopic
    Date_Time).

 2.3 - /BY_OWNER

       /BY_OWNER[=uic]

    Selects only those files whose owner user identification code
    (UIC) matches the specified owner UIC. The default UIC is that of
    the current process.

    Specify the UIC by using standard UIC format as described in the
    OpenVMS Guide to System Security.

 2.4 - /CONFIRM

       /CONFIRM
       /NOCONFIRM (default)

    Controls whether a request is issued before each purge operation
    to confirm that the operation should be performed on that file.
    The following responses are valid:

    YES      NO       QUIT
    TRUE     FALSE    Ctrl/Z
    1        0        ALL
             <Return>

    You can use any combination of uppercase and lowercase letters
    for word responses. Word responses can be abbreviated to one or
    more letters (for example, T, TR, or TRU for TRUE), but these
    abbreviations must be unique. Affirmative answers are YES, TRUE,
    and 1. Negative answers include: NO, FALSE, 0, and pressing
    Return. Entering QUIT or pressing Ctrl/Z indicates that you want
    to stop processing the command at that point. When you respond by
    entering 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, DCL issues an error message and redisplays
    the prompt.

 2.5 - /CREATED

       /CREATED (default)

    Modifies the time value specified with the /BEFORE or the /SINCE
    qualifier. The /CREATED qualifier selects files based on their
    dates of creation. This qualifier is incompatible with the
    /BACKUP, /EXPIRED, and /MODIFIED qualifiers, which also allow
    you to select files according to time attributes. If you specify
    none of these four time qualifiers, the default is the /CREATED
    qualifier.

 2.6 - /ERASE

       /ERASE
       /NOERASE (default)

    Erases the specified files from the disk so that the purged data
    no longer exists physically on the deallocated disk blocks.

    When you 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. When the /ERASE qualifier is specified, the
    storage location is overwritten with a system-specified pattern
    so that the data no longer exists.

 2.7 - /EXCLUDE

       /EXCLUDE=(filespec[,...])

    Excludes the specified files from the purge operation. You can
    include a directory but not a device in the file specification.
    The asterisk (*) and the percent sign (%) wildcard characters
    are allowed in the file specification; however, you cannot use
    relative version numbers to exclude a specific version. If you
    specify only one file, you can omit the parentheses.

 2.8 - /EXPIRED

    Modifies the time value specified with the /BEFORE or the /SINCE
    qualifier. The /EXPIRED qualifier selects files according to
    their expiration dates. (The expiration date is set with the
    SET FILE/EXPIRATION_DATE command.) The /EXPIRED qualifier
    is incompatible with the /BACKUP, /CREATED, and /MODIFIED
    qualifiers, which also allow you to select files according
    to time attributes. If you specify none of these four time
    qualifiers, the default is the /CREATED qualifier.

 2.9 - /KEEP

       /KEEP=number-of-versions

    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.

 2.10 - /LOG

       /LOG
       /NOLOG (default)

    Controls whether file specifications are displayed as the files
    are deleted.

 2.11 - /MODIFIED

    Modifies the time value specified with the /BEFORE or the /SINCE
    qualifier. The /MODIFIED qualifier selects files according to
    the dates on which they were last modified. This qualifier
    is incompatible with the /BACKUP, /CREATED, and /EXPIRED
    qualifiers, which also allow you to select files according
    to time attributes. If you specify none of these four time
    modifiers, the default is the /CREATED qualifier.

 2.12 - /SINCE

       /SINCE[=time]

    Selects only those files dated on or after the specified time.
    You can specify time as absolute time, as a combination of
    absolute and delta times, or as one of the following keywords:
    BOOT, LOGIN, TODAY (default), TOMORROW, or YESTERDAY. Specify one
    of the following qualifiers with the /SINCE qualifier to indicate
    the time attribute to be used as the basis for selection:
    /BACKUP, /CREATED (default), /EXPIRED, or /MODIFIED.

    For complete information on specifying time values, refer to the
    OpenVMS User's Manual or the online help topic DCL_Tips (subtopic
    Date_Time).

 2.13 - /STYLE

       /STYLE=keyword

    Specifies the file name format for display purposes while purging
    files.

    The valid keywords for this qualifier are CONDENSED and EXPANDED.
    Descriptions are as follows:

    Keyword     Explanation

    CONDENSED   Displays the file name representation of what is
    (default)   generated to fit into a 255-length character string.
                This file name may contain a DID or FID abbreviation
                in the file specification.
    EXPANDED    Displays the file name representation of what is
                stored on disk. This file name does not contain any
                DID or FID abbreviations.

    The keywords CONDENSED and EXPANDED are mutually exclusive. This
    qualifier specifies which file name format is displayed in the
    output message, along with the confirmation if requested.

    File errors are displayed with the CONDENSED file specification
    unless the EXPANDED keyword is specified.

    Refer to the OpenVMS Guide to Extended File Specifications for
    more information.

  3 - Examples

    1.$ PURGE

      The PURGE command in this example deletes all but the highest
      numbered version of all files in the default directory.

    2.$ PURGE *.COM

      The PURGE command in this example deletes all but the highest
      numbered version of each file with a file type of .COM.

    3.$ PURGE/KEEP=3  [WILDER.JOB308]ACCOUNT.COB

      The PURGE command in this example deletes all but the three
      highest numbered versions of the file ACCOUNT.COB in the
      subdirectory [WILDER.JOB308].

    4.$ PURGE/ERASE/SINCE=YESTERDAY [.MEMOS]

      The PURGE command in this example purges all files in the MEMOS
      subdirectory that have been created or modified since yesterday
      and erases the storage locations so that the purged data no
      longer exists.

    5.$ PURGE [BRODRIBB.TESTFILES]/LOG
      %PURGE-I-FILPURG, DISK1:[BRODRIBB.TESTFILES]AVE.OBJ;1 deleted (3 blocks)
      %PURGE-I-FILPURG, DISK1:[BRODRIBB.TESTFILES]BACK.OBJ;2 deleted (5 blocks)
      %PURGE-I-TOTAL, 2 files deleted (8 blocks)

      The PURGE command in this example purges all files cataloged in
      the subdirectory named [BRODRIBB.TESTFILES]. The /LOG qualifier
      requests the PURGE command to display the specification of each
      file it has deleted as well as the total number of files that
      have been deleted.

    6.$ PURGE/KEEP=2 TAMPA::DISK1:[EXAMPLE]*.LIS

      The PURGE command in this example deletes all but the two
      highest numbered versions of each file with the file type .LIS
      in the directory EXAMPLE on remote node TAMPA.
  Close     HLB-list     TLB-list     Help  

[legal] [privacy] [GNU] [policy] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.