I avoid "rm *". (tummy.com, ltd. Journal Entry)
tummy.com: we do linux

Thursday August 19, 2010 at 19:26
Subject: I avoid "rm *".
Keywords: Linux, NCLUG, Process
Posted by: Sean Reifschneider

I'm worried about what happens if a command from the history is accidentally re-run -- whether by me or by someone else on the system. It happens. So, instead of doing "rm *" I'll usually do "cd .." and then "rm myfiles/*". And for things like "rm -rf mysql" if I'm re-initializing a database or something, I'll often do "mv mysql mysql.old" and then "rm -rf mysql.old". Repeating this command or running it on the wrong server would hopefully never break things.

These are the things that I worry about as a sysadmin. :-)
(Post Reply)