What Happens When You Run “rm -rf /”

I’ve known for a long time to stay away from the short, sweet and simple “rm -rf /” command.  It deletes every file on any writable filesystem mounted by a *nix system, but what exactly happens if you do run it?  

Do green leprechauns jump off the screen to warn you that you shouldn’t do it?  Not quite.

Here’s a video with the verbose option set to make it a little bit more interesting.  I’m running it in a virtual machine so I can capture video of all the “action” – it was a bit slow to complete, but I’ve gone ahead and increased how quickly it runs to not be nearly so boring.

Enjoy!

At the very end you can see that X crashes on the VM when I click where the trash icon would be. Rebooting results in a GRUB error 15.

If you’d like to hear a horror story about someone running rm recursively, check it out here: http://www.ee.ryerson.ca/~elf/hack/recovery.html

This entry was posted in Linux, Video and tagged . Bookmark the permalink.

72 Responses to What Happens When You Run “rm -rf /”

  1. of7010 says:

    sohib oprzftw

  2. 1ace says:

    That’s a lot of spam :/

    FYI, Ubuntu 8.04 warns you if your run “sudo rm -rf /”:
    “rm: cannot remove root directory `/’”
    … but says nothing to “sudo rm -rf /*” ^^

  3. of6230 says:

    aevipy hzqvtnl esqi

  4. of1878 says:

    yljkse drlipnh

  5. of8821 says:

    puhigm tjlxibe

  6. of7126 says:

    humvqkw xzdjp qyhfec

  7. of4392 says:

    fylzt lzbqmt hrusg wvzo

  8. of106 says:

    uhnkc etqiudw

  9. of4978 says:

    gwzn yintmkc hveslw zscn

  10. oyoy says:

    Dumbass

  11. Steve says:

    Hi,
    I just experienced this. I copied the command from a blog (can’t remember where.)
    Anyways, not only did it delete almost everything, it also traversed down the network, into my file server and also deleted a huge amount of file before I noticed it and stopped it.

    What happened was it also deleted the .gvfs folder. Since the .gvfs folder also has pointers to any network folder that you’ve accessed, it also traversed those files. Problem is I generally access my network files using admin rights, so it just went to my .gvfs folder, to my network shares (with admin rights) and just started deleted everything. Luckily I have backups on a seperate pc.

    It was really scary. Taught me a good lesson..

  12. Hi, Neat post. There is a problem with your web site in web explorer, could check this… IE still is the market chief and a good component to other people will leave out your fantastic writing because of this problem.

  13. I like this blog very much, Its a real nice billet to read and obtain info. “I ran the wrong kind of business, but I did it with integrity.” by Sydney Biddle Barrows.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>