Comments on: The Path of Destruction: rm -rf http://blog.superuser.com/2011/07/25/the-path-of-destruction-rm-rf/ The Super User Community Blog Mon, 05 Dec 2016 07:34:06 +0000 hourly 1 https://wordpress.org/?v=4.5.6 By: jarco http://blog.superuser.com/2011/07/25/the-path-of-destruction-rm-rf/#comment-373 Mon, 08 Aug 2011 09:12:53 +0000 http://blog.superuser.com/?p=3726#comment-373 I have done this by accident on a live server for shared webhosting (over 200 costumers where on it) I typed something like “#rm -rf /var/www/vhosts/somefolder /” The end / was spaced without me seeing the command. I had run the command many many times before…

To bad centos doesn’t give back this nice warning you got. After a while I noticed a huge amount of warning (like you got and quickly canceled the command). Booting into the system was an impossibility. The mails where gone. The boot folder gone. The only folder left was … /var/ .

So you would think backups …

The person responsible for that just told me they where not existing. The backup server was a new one from the day before and it just so happened that there where no backups from before…

Needless to say we both had a lot of work that day. A lot of angry calls, mails and tickets. And a LOT of explaining to do to the boss.

Yes we where a messy company. Yes the company stopped existing a few years ago. This was my rm -rf story. My former colleagues still haunt me with this from time to time.

]]>
By: warren http://blog.superuser.com/2011/07/25/the-path-of-destruction-rm-rf/#comment-372 Mon, 25 Jul 2011 06:08:54 +0000 http://blog.superuser.com/?p=3726#comment-372 I’ve done this myself intentionally a couple times – first to see what would happen, then to muck-up a system before doing a reinstall (it had upset me).

You [should] be able to use the ever-popular echo * to show all files in a directory even if ls is kaput. Or, for fname in * ; do echo $fname ; done

(Those two don’t work for me under Ubuntu 10.04, however)

]]>
By: nhinkle http://blog.superuser.com/2011/07/25/the-path-of-destruction-rm-rf/#comment-371 Mon, 25 Jul 2011 05:13:55 +0000 http://blog.superuser.com/?p=3726#comment-371 Excellent write-up Simon! Interesting to see just what a simple command like this can do. Perhaps next you can write about fork bombs!

]]>