The glory of sudo allows you to granularly deny certain uses of commands mixed with certain arguments/options. I am sure I read a document online a few years back on the subject of safe sudo practices. I had developed a nice sudoers file for use on an email server system shortly after a colleague accidentally ran a similar command at the root level of the mailbox directory. 

-------- Original message --------
From: Mike Miller <mbmiller+l at gmail.com> 
Date:  
To: TCLUG List <tclug-list at mn-linux.org> 
Subject: [tclug-list] worst Linux/UNIX command line mistake, ever 
 
I have a few users on a box at work.  Some are not active.  I'm also about 
to move everything to a new machine.

This is the stupid thing I did.  The hard drive was full so I needed to 
make some space.  I copied files from /home/marc to another machine and 
then was going to remove /home/marc.  So I did this...

cd /home/marc
sudo rm -rf *  <-- that would have been OK, but I killed that command
cd ..
sudo rm -rf marc  <-- what I intended to do, which would have been fine
sudo rm -rf *  <-- what I did instead

That would have wiped every file out of /home if I hadn't realized almost 
instantly what I had done.  So I hit Ctrl-C a couple of times fast and 
looked at the damage.  Nothing was lost except for all of the files for 
the user whose name was first in alphabetical order.  All 858 MB of files.

Luckily, this user was probably just using the account to transfer files 
between other machines on a firewalled network, so it might not be a big 
deal, but I'm not sure.

I consider myself lucky that I stopped it quickly, but that doesn't help 
him because his files are all gone.

Yikes.  I'll bet you know you should be careful with this command:

sudo rm -rf *

That's like the most dangerous command there is, except maybe for this 
one:

sudo rm -rf /*

But we don't use that command in real life, just a joke for noobs.

Mike
_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
tclug-list at mn-linux.org
http://mailman.mn-linux.org/mailman/listinfo/tclug-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.mn-linux.org/pipermail/tclug-list/attachments/20130518/92b98ed4/attachment.html>