jik@athena.mit.edu (Jonathan I. Kamens) (04/26/91)
In article <26647@adm.brl.mil>, X903%DMAFHT1.BITNET@cunyvm.cuny.edu ( Marc Wachowitz) writes: |> Undelete utility? Unneccessary. Just make "rm" an alias to a simple |> program that moves your file to a designated directory, perhaps giving |> a unique name to it and recording the association between the original |> name (including path) in a log file; including the date of "deletion". |> ... |> Implementation is trivial and |> left to the interested reader :-) Implementation is very trivial, because it has already been done. See the "delete" package in comp.sources.misc. My implementation differs from yours -- deleted files are kept in the current directory, rather than in a temporary directory, and no log files are kept. We considered the implementation you describe when designing the program, but it is not appropriate in a distributed computing environment and in a program that wants to be robust. If you want something simpler than "delete", there are several other programs in the comp.sources.unix archives to do recoverable rm's. Note the Followup-To; the discussion of how to write user-level undelete programs isn't a wizardly topic, even though the discussion of modifying Unix so that it allows undeletion might be. -- Jonathan Kamens USnail: MIT Project Athena 11 Ashford Terrace jik@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710