HPlogo Using HP 3000 MPE/iX: Fundamental Skills Tutorial: HP 3000 MPE/iX Computer Systems > Chapter 6 Working with Files

Lesson 4 Deleting Files

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Lesson 4 presents deleting files.

  • the command to erase a file: PURGE

  • recovering from an accidental file erasure

The PURGE command

The PURGE command erases a file. It erases only one file at a time. If you want to erase five files, you need to use the PURGE command five times.

Make sure that you are in the home group of your account. Recall from module 4 that the LISTUSER command shows which group is designated as your home group.

Enter:

   LISTUSERReturn
NOTE: LISTUSER does not tell you which group you are currently in. It tells you only which group is designated as your home group.

To find out which group you are currently in, use the SHOWME command.

Enter:

   SHOWMEReturn

Use CHGROUP if necessary get into your home group.

To purge the file called NEWDRAFT, enter:

   PURGE NEWDRAFTReturn

Use LISTFILE to make sure that NEWDRAFT has been removed.

Now erase NXTDRAFT in the same way.

   PURGE NXTDRAFTReturn

If you try to erase a file that does not exist, you get an error message.

Try to erase the file QZQXQZ. What happens? (Of course, if the file does exist, it is erased. MPE/iX assumes that you know what you want to do when you issue a command.)

Recovering a file

The day will come when you accidentally erase a file that you need. It happens to almost everyone at some time.

MPE/iX does not provide an unerase command. MPE/iX assumes that you knew what you were doing when you erased a file.

There is a remedy. Your system operations personnel should perform regular system backups (storing all of the files on the system to tape).

  • If you created the file after the last backup, you cannot retrieve the file.

  • If you created the file before the last backup, you can restore the file to the computer.

  • If you created the file before that last backup but you modified it after the last backup, you can restore the earlier version of the file; however, the modifications are lost.

For this exercise, suppose the following:

  • Your system operator regularly backs up files on the system every day at 6:00 P.M.

  • You made changes to MYFILE yesterday (Monday).

  • Today is Tuesday, 11:00 A.M.

  • You have been working on MYFILE all morning.

  • You accidentally erased MYFILE five minutes ago.

What would you do?

  • Ask your system operator to have MYFILE restored to the group and account where it belongs.

What is restored?

  • All of the changes made to MYFILE on Monday are restored. (The backup was performed at 6:00 P.M. yesterday.)

  • You have lost the work that you did today (Tuesday), and you need to reenter those changes.

How much work is lost depends on two things:

  • how much time has passed since you made changes to the file and kept it

  • how much time has passed since the files on your system were stored to tape in a backup

NOTE: System operation departments have different backup schedules, but all should perform regular file backups. Find out from your manager or system operations department what the backup schedule is. One day you may need to know.

Lesson 4 Exercises

  1. Delete the file MAPLE from your account. Check to see if you were successful.

  2. Consider the following scenario:

    In your office, the backup of files is done daily after 5:00 P.M. It is now 3:00 P.M. on Friday. You have just completed updating a file called STATUS. For the past week, you have been updating this file daily.

    While purging other files from your account, you accidentaly purged the STATUS file. Which one of the following statements is true?

    1. Two days' worth of updated material has been lost and cannot be restored to the system.

    2. Today's updated material has been lost and cannot be restored.

    3. The entire file is lost and cannot be restored, but Thursday's work can be restored.

    4. Nothing has been lost.

Feedback to webmaster