How to undo “rm -rf /”

One of the worst things you can do by accident on a Unix/Linux box is run the command above. (DON’T! Or I will not be responsible for the consequences.) If you are running as root - you’re not are you? - this command would delete your entire file system. That is, every file you’ve ever created would be gone.

Suffice to say, this is often considered a “Bad Thing”.

I ran across this interesting account of how to undo some of the damage described above. Note: This is really only for *serious* Linux geeks. Frankly, some of what they describe I didn’t know was possible. Then again, I’m barely a Linux user much less an admin.

As a challenge, can anyone tell me why on some Linux distributions the above command will fail part way through? No, its not a safety measure. I’ll give you a clue, where does the “rm” binary live?

Leave a Reply

You must be logged in to post a comment.