[linux-elitists] undelete

Ben Woodard woodard@redhat.com
Wed Feb 6 21:09:36 PST 2002


> (Asking how to do file undelete is of course highly non-elitist,
> since the true elitist thing to do is come up with a good reason
> why you didn't need the file, and _meant_ to clobber it.)
> 
> The following is an idea for a way to do undelete.
> 
> 1. Kernel level: If a system call would clobber a file, spew that
> file's meta-info, then contents out a /proc entry before doing
> the work.  System calls to intercept and check include unlink(2),
> open(2), and rename(2).

Don, Don, Don don't make things any more difficult than they need to
be. Create a tiny library that redefines the unlink(2) syscall and
does something with the file like copies it to another directory. Then
set LD_PRELOAD to load the library before you execute anything.

-ben

> 
> 2. Tomb daemon: Read from the /proc entry; if a file appears
> "interesting" from the meta-info, park it in a tomb area (the term
> "tomb" for this kind of area is from Purdue).  If the tomb is
> "too big", unlink the oldest files in it until it's small enough.
> (The kernel will then spew them back through the proc entry;
> ignore them.)
> 
> 3. "can I have my file back please" utilities
> 
> -- 
> Don Marti                                          
> http://zgp.org/~dmarti       Join the Distributed Unisys Google Experiment.
> dmarti@zgp.org                 <a href="http://burnallgifs.org/">Unisys</a>
> KG6INA                                                          everywhere. 
> _______________________________________________
> linux-elitists 
> http://zgp.org/mailman/listinfo/linux-elitists




More information about the linux-elitists mailing list