I'm going to barf

Sep 30, 2009 16:37

There comes a time in every Unix user's life when he makes the mistake of typing "rm *" (or, if he's particularly unlucky, "rm -rf") -- the command to delete everything in a directory. For me, this time came today ( Read more... )

life

Leave a comment

Comments 4

glennwarrens September 30 2009, 23:54:09 UTC
I find that having a script aliased in place of rm which moves files to a hidden folder in my home directory (or root's directory) that gets purged at logoff saves me this kind of trouble. If I really want to delete it, then I can just specify the hard path to rm to truly delete it. It's stopped me from making this same mistake - and I've done it at least four times now, especially when I've had the intent of rm -rf *.mp3 from my storage partition (I'd copied my music onto my iPod) and instead hitting enter prematurely and removing half the hard drive before I noticed what was going on.

Here's hoping it's recoverable.

Reply

glennwarrens September 30 2009, 23:55:54 UTC

flamer_ohr October 3 2009, 22:31:24 UTC
I avoid "rm -rf " especially with a wildcard somewhere in the criteria
my habit is about the same as minnek's, I just "mv" the files to somewhere to permanent deleting later using an absolute pathname.

Reply


shaede October 4 2009, 16:05:21 UTC
Unix is such a cruel mistress. It's one of the reasons I abandoned programming.

Reply


Leave a comment

Up