[Gllug] Is this funny

Richard Cohen richard at vmlinuz.org
Wed Jan 2 17:01:30 UTC 2002


On Wed, 2 Jan 2002, Paul Brazier wrote:

> > Not quite, but what I have done is:
> >
> > 	rm *&.sh
> >
> > The * and & keys being next to each other, my finger had rolled over
> > and just clipped the & without me noticing, until the last
> > ohnosecond[1]
> > when my hand was heading for the return key, but it was too
> > late to stop
> > it...
>
> Is there any logical reason why linux doesn't have an "undelete" command
> built in?
>
> It would seem quite useful as typos and accidental deletions would seem
> quite common.
> Surely the actual data is usually lying around on the disk somewhere.
> Even is it has been overwritten it could at least have a go.
>
> Is it because of the way linux can have non-local filesystems grafted
> on?
> Or some security problems?
>
> Why not have a kind of "command-line recycle bin" where deleted files go
> until you empty it?
> Could you have an amended "rm" that moves deleted stuff to somewhere
> like this instead of deleting it totally. Then some switch to *really*
> delete this when you're sure?

I've seen it done.  Make rm a wrapper (or alias) for something which moves
files to, for example, ~/.trash/$ORIGINAL_FILENAME

I found http://www.uwsg.iu.edu/hypermail/linux/kernel/9606.2/0386.html (from
many years ago) while doing a quick Google to try to find a nice safe-rm
implementation.  Be careful - unless a safe-rm is carefully written, it can
lead to accidental file deletion very easily.

> --
> Paul Brazier
> Cosmos UK

Cheers
Richard


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list