[ILUG] replacing the rm binary :-)

Kieran Murphy daffster at gmail.com
Wed Sep 1 20:45:23 IST 2010


On Wed, Sep 1, 2010 at 8:39 PM, Lisa Muir <34.24.34 at gmail.com> wrote:

> Hi Guys,
>
> I was asked to look at data recovery from ext3..... and no, it didnt
> work. An absent minded colleage rm'd the web root of a server which
> hadn't its latest changes committed to the subversion repo.
>
> I've been thinking about it, and wondering if it would be an idea to
> replace rm with a script based on mv to make it easier to recover from
> incidents like this. It gets complex when you consider the various
> commandline switches and then handling multiple files of the same name
> in wherever you move the files, missing folder context. Was thinking
> of moving files to a zapme folder in some location with a cron script
> to actually delete files or folders in zapme folders which are older
> than 1 week old.
>
> Just curious to know if anyone has worked on anything like that before
> or seen anything like it in the online projects?
>
> Lisa.
>

Something along the lines of what the Trash can does?
Instead of deleting a file, it just moves it to another directory.

Something like
http://ubuntuforums.org/showpost.php?p=3008954&postcount=4
perhaps?

Regards,
Kieran.


More information about the ILUG mailing list