HPlogo MPE/iX Commands Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 6 Command Definitions P-R

PURGE

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

This command deletes one or more files from the system.

Syntax

PURGE filereference [;TEMP] [[;ONERROR=] { CONTINUE QUIT }]
[ { ;AUTOLOCKWORD ;NOAUTOLOCKWORD }] [ { ;CONFIRM ;NOCONFIRM ;CONFIRMALL }]
[ { ;NOSHOW ;SHOW }] [{ ;SHOWERRORS ;NOSHOWERRORS }]

Parameters

filereference

The actual file designator of the file to be deleted, interpreted according to MPE-escaped semantics filereference, can be either an MPE file (i.e., one that uses MPE syntax) or it can be a POSIX file name beginning with a dot or a slash. For example, you can use the escaped pathname /SYS/PUB/FILE since it is equivalent to the MPE name FILE.PUB.SYS.

TEMP

Specifies that the file is a temporary file in the job/session temporary file domain. You can specify a filename in MPE or HFS syntax and may name a symbolic link that resolves to a filename. You must enter this parameter to delete a temporary file. The default is that a permanent file is assumed.

CONTINUE

Allows PURGE to continue until the end of the list is reached, regardless of errors. CONTINUE is the default option.

QUIT

Quits the execution of PURGE when it encounters an error and sets the CIERROR variable to the last execution error.

AUTOLOCKWORD

Directs PURGE to look up and resolve file lockwords automatically. Users with system manager (SM) capability can specify AUTOLOCKWORD for all files on the system. Users with account manager (AM) capability can specify AUTOLOCKWORD for all files within their account.

NOAUTOLOCKWORD

Requires the user to specify a file's lockword before the file is purged. This is the default.

CONFIRM

Verifies the filereference parameter by requiring you to validate the purge during command execution. Valid responses are "YES" or "NO". If you respond "YES", the PURGE command is executed. Pressing Break at the prompt is equivalent to responding "NO". CONFIRM is the default for sessions, unless the filereference designates a single file.

NOCONFIRM

Continues the purge without verification from the user. NOCONFIRM is the default for jobs or if the filereference designates a single file.

CONFIRMALL

Requests verification for each file before the purge is executed. A proper response is one of the following:

  • "Y" or "YES" to purge the file

  • "N", "NO", or Return to retain the file

  • "Q", "QUIT", or Break to stop the PURGE command

The CONFIRMALL option is ignored in jobs and when you are purging a single file.

NOSHOW

Suppresses the display of each successfully purged file. NOSHOW is the default.

SHOW

Displays the name of each successfully purged file.

SHOWERRORS

Displays each lower-level error which prevents a file from being deleted. The name of the file is shown, followed by the error message. By default lower-level errors are not displayed. You may also enter this option in the singular form, i.e. SHOWERROR.

NOSHOWERRORS

Suppresses the display of low-level errors. NOSHOWERRORS is the default. You may also enter this option in the singular form, i.e. NOSHOWERROR.

Operation Notes

  • Usage

    You can enter this command from a session, a job, a program, or in break mode. Pressing Break does not affect this command.

    You must have write access to a file to delete it.

  • Purging unrecognized files

    If the file does not exist in the specified domain, the following message appears:

      FILE filename NOT FOUND, NO PURGE DONE. (CIWARN 383)
  • Purging non-private spool files

    You can purge a non-private spool file by entering PURGE filename. You must specify the fully qualified file name (including .OUT.HPSPOOL). The PURGE command deletes the specified spool file and all links to the spool file directory. The spool file does not print after you purge it.

  • Purging files with wildcards

    You can use wildcards to remove multiple files at once. You can also use the CONFIRMALL option to prevent accidental deletion of one or more files. Examples of the wildcard feature are listed in the Examples section below:

Examples

  • To delete a permanent file named PFILE, enter:

      :PURGE PFILE
  • To purge multiple files using wildcards

      :PURGE /users/jeff/bin/FILES/file@
    3 FILES matched
    Continue PURGE? (YES/NO) yes
    3 selected. 3 succeeded. 0 failed.
  • To purge multiple files interactively using wildcards

    To purge a number of files, one at a time, in an interactive mode so that you can skip a file or stop your purge, you can use the CONFIRMALL option.

      :PURGE /users/jeff/bin/FILES/file@; CONFIRMALL
    3 FILES matched
    /users/jeff/bin/FILES/file1 ? (NO/YES/QUIT) yes
    /users/jeff/bin/FILES/file2 ? (NO/YES/QUIT) no
    /users/jeff/bin/FILES/file3 ? (NO/YES/QUIT) yes
    2 selected. 2 succeeded. 0 failed.

    Type "q","quit", or press the BREAK key if you decide to stop the PURGE command completely.

  • To purge log files using wildcards

    The following example shows you how to purge all log files within your current working directory that start with log, followed by any number from 0 - 9 (#), followed by any number of alphanumeric characters (@).

      :PURGE log#@
    10 FILES matched
    Continue PURGE? (YES/NO) yes
    10 selected. 9 succeeded. 1 failed.

    Since the PURGE command does not remove the currently opened log file, the command always returns "1 failed".

Related Information

Commands

ALTSEC, BUILD, LISTFILE, LISTSPF

Manuals

None

Feedback to webmaster