Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Watching rm recursively burn through your filesystem is a right of passage.

I had a genius intern. Straight out of high school, his understanding of asynchronous design put plenty of my peers to shame. Course, his unix experience, especially permissions in this case, was a bit light.

I decided to use OSX's iChat to share my screen with him. As you know, iChat used to allow full control of the local machine to the remote viewer. My bright-eyed genius intern realized this:

    Oh cool! I can move your mouse!
...he says, as he starts clicking around...

    Can I type?!
...and he types "rm -rf /" in my open terminal.

In panic, I smashed every key on my keyboard, fortunately scoring a CONTROL+C relatively quickly. I hoped the damage was minimal, mostly praying it did not touch my home directory. I watched as every application I tried to open failed to start...

Every application I had installed, up to somewhere near X in the alphabet, had been deleted without prejudice before I managed to kill the command. Fortunately my home directory was safe; thank you "/Users" on OSX.

My intern's response was:

    That command won't do anything, I didn't sudo it!
That's the day I setup Time Machine on that system.


Oh man. if their is anything I have learned about the command line, its don't fuck around with rm.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: