[Tfug] emulating a recycle bin
Robert Hunter
hunter at tfug.org
Tue Sep 30 01:03:50 MST 2008
On Mon, Sep 29, 2008 at 11:03:03PM -0700, christopher wrote:
> hey, I just had an accident with a file. Well, I guess
> when you typed in the command and confirmed the
> override, you can't call it an accident, but anyway
> it's deleted.
>
> Now it's not a file I can't replace because I had a
> backup, but it made me do some searching and it seems
> the only way to avoid really losing such a file is to
> 'emulate a recycle bin'. Do any of you do this?
GNOME has a trash bin, and there are probably others, as well.
However, even these tools have their equivalent of "rm -rf", so
sometimes there really is no fixing stupid, as Ron White says.
When using rm with -f, -r, or wild-cards, I try to always type the
complete argument, then arrow back, and add the power options. It's
kind of like leaving the safety on until you are ready to shoot.
One of my "memorable" experiences concerns this coworker who was a victim of
a bizarre fluke. One fine day, she was working away in her terminal
session, and was in the process of doing something like "rm *.o", but
had gotten only as far as "rm *". You see where this is going, don't
you? Anyhow, at that precise moment, a program that was running in
the background decided to print a bunch of error messages to her
terminal, and she could no longer make out what she had typed. A
simple Ctrl-C would have nuked her command, and let her start over,
but instead she opted to press Enter. *Apply palm to face now*
Naturally, she panicked when she realized what had happened, and
decided to pay a visit to my office, complaining that a stupid program
"had deleted all her files". After making out the sequence of events,
I tried explain to her that the "stupid program" was in fact /bin/rm,
and the she had had been extremely unlucky. I also tried to console
her with explanations and advice, such as:
-the differences of the standard streams
-the wisdom of using "rm" with the interactive option
-how makefiles would make her life much easier
-that she might want to think about doing backups
But she was having none of it, utterly convinced that she had done
nothing wrong, beyond the Point of No Return, down the Road of Denial,
in the land of Luser. It's moments like these when you realize that
Simon Trivaglia is a genius.
--Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://tfug.org/pipermail/tfug_tfug.org/attachments/20080930/2d7fa843/attachment.asc>
More information about the tfug
mailing list