an unrm command for UNIX
FRAZIER%AFGLSC.SPAN at star.stanford.edu
FRAZIER%AFGLSC.SPAN at star.stanford.edu
Thu Apr 21 00:45:53 AEST 1988
About three years ago I wrote a group of programs that accomplished
what you are talking about. (Not quite as nicely of course) I wrote a
version of rm that instead of removing a file, moved it to a directory
on the temp file structure. (We had loads of disk space) Then if you wanted
to undelete the file, unrm would find the file and move it back to
your current directory. A program called purge that would delete the contents
of the directory on the temp file system. I wrote a command file that
was run via "at" at midnight every five days and purged all the files out of
the temp directory.
I had thought of doing what you had mentioned. (Ie: remembering where
blocks ended up, etc.) This isn't reasonable for a few reasons. Once someone
writes to that file system, the free block will be re-used therefore making
the retrieval impossible. The overhead for such a program in terms of CPU
usage and I/O factors would also make this approach undesireable. With the
method mentioned above, the system administrator has absolute control over
how long deleted files may reside on the system. He may even decide not to
purge the deleted files and destage them to tape. My point being that
the users have finite control over their files. (Yes, the temp directory
is protected from the public and you could hack purge to make it only nuke
files in the temp directory that you had put there.) My code was written
for system V and worked without a hitch so I know for a fact that this
can be accomplished easily assuming you have the spare disk space.
-Frazier
Frazier%afgl.span at star.stanford.edu
More information about the Comp.unix.wizards
mailing list