[Tfug] emulating a recycle bin

Matthew T. Eskes meskes at gmail.com
Tue Sep 30 01:27:15 MST 2008


W00t BOfH++;

-- The Founding Fathers struggled for the principle that man could and
should be trusted with his own destiny. Our current /domestic/ enemies,
against whom those Americans in uniform are sworn to defend, do not believe
in this principle, but we have again won a round in the endless fight
against them.
    
   -- Jeff Cooper on the assault weapons ban ending 

-----Original Message-----
From: tfug-bounces at tfug.org [mailto:tfug-bounces at tfug.org] On Behalf Of
Robert Hunter
Sent: Tuesday, September 30, 2008 1:04 AM
To: Tucson Free Unix Group
Subject: Re: [Tfug] emulating a recycle bin


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





More information about the tfug mailing list