Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!pasteur!ucbvax!VENUS.YCC.YALE.EDU!LEICHTER From: LEICHTER@VENUS.YCC.YALE.EDU ("Jerry Leichter ", LEICHTER-JERRY@CS.YALE.EDU) Newsgroups: comp.os.vms Subject: re: Restoring deleted files on VAX/VMS !!!! Message-ID: <8805050745.AA20425@ucbvax.Berkeley.EDU> Date: 30 Apr 88 17:43:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 40 The other day I just deleted 3 weeks work of Pascal source code. So now I'll like to know if there is a way to undelete files, that is locate them on the disk ? Forget it; they are long gone by now. The VMS disk-space allocation mecha- nisms make it almost certain that a file header you release in deleting a file will be re-used fairly quickly. Without that, even assuming the blocks your files lived in haven't been re-used - also likely to be false - they'd be almost impossible to find. About the only time you can hope to recover deleted files is if you detect the error and take the disk off-line - or even crash the system - within a couple of minutes. Even then, you'd be looking at a lot of work to recover the stuff. Now you know why regular backups are so important! I'll also like to know if anyone has a program which doesn't delete the files, but moves them to a another place om the disk and from where you can undelete them again ? If all you are concerned with is uses of the DELETE command from DCL level, the following will do the trick: Create a subdirectory someplace; for me, it might be USERCS:[LEICHTER.WASTEBASKET]. Also create the one-line command file DELETE.COM: $ RENAME 'P1' Finally, in your LOGIN.COM file, do: $ REALLY_DELETE :== DELETE $ DEL*ETE :== @DELETE It is possible, although harder, to make a PURGE.COM file that lets your PURGE command move stuff to the WASTEBASKET, too. Dealing with other ways that files get deleted - in user programs, by automa- tic deletion due to version limits, etc. - isn't practical except on a case- by-case basis. -- Jerry