(NEVER DO THIS:) Just typed "sudo rm -rf/*" in Terminal, what to do?

I'm always up for a good joke myself so I can't really complain about this one, but yeah, what the heII - I just fell for the (apparently) old joke to type the above command into terminal. Yeah, I'm an idiot, I know, but the question here is - what to do now?

The system boots up fine, although I've read it will go into an infinite reboot cycle after a certain uptime. I've got a recent Time Machine backup and a Snow Leopard Install disc at home.

Can I just install OSX over the ruined system?
Will that work at all?
Or do I have to kill the whole thing (via disk utility from the Leopard install disc), re-install OSX and get my data back with Time Machine?

Any help would be greatly appreciated!

Thanks a ton,
V

Macbook 5,1 2.4GHz IC2D, 4GB 1067MHz, Mac OS X (10.6.6), iPhone 4, 32GB ger, FW 4.01, T-Mobile

Posted on Feb 20, 2011 7:29 AM

Reply
12 replies

Feb 20, 2011 7:39 AM in response to VNDL42

VNDL42 wrote:
I just fell for the (apparently) old joke to type the above command into terminal. Yeah, I'm a noob, an idiot, got pwned and all that, I know. So the question here is - what to do now?

The system boots up fine, although I've read it will go into an infinite reboot cycle after a certain uptime. I've got a recent Time Machine backup and a Snow Leopard Install disc at home.

Can I install OSX over the ruined system?
Will that work at all?


Yes, it should work. In fact, it's one of the new new features in 10.6. But having nuked the system it really won't matter if you install over or erase and install.

You can also use your TM backup and use the restore feature, unless that's still functional and you wrote a backup after the Terminal command.

Good luck. Let us know...


User uploaded file
-mj

Feb 20, 2011 3:28 PM in response to VNDL42

So yeah, restored from my TM backup via the OSX install disc and the system seems to run fine, thanks a lot guys, seriously.
I still messed up as I forgot that I exclude my music and video folders in TM to save space on my backup drive. So I learned two lessons today, a) don't enter sudo commands when you're not 100% sure what they're doing (I guess I hereby choose to stay away from the terminal completely) and b) make sure to remember what folders you exclude from your backup so you don't add subfolders that you care about to them.

And yeah, bad ******* joke, or trap, however you want to call it. But like I said, I guess this is what I get for entering commands into terminal I don't know sh*t about.

Thanks again for your help.
V

Feb 20, 2011 9:57 PM in response to VNDL42

Hey, it can happen to the best of us.

Rules for "rm".

Try to avoid using "sudo" with rm whenever possible.

Avoid the "r" switch (recursive into directories option) whenever possible.

If you use the "r" switch, use the "i" switch too (interactive option), also avoid the "f"
(force without prompting option).

Use "v" verbose option, to see what is being deleted.

Always type in the full path name, rather than changing to the directory first.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

(NEVER DO THIS:) Just typed "sudo rm -rf/*" in Terminal, what to do?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.