Accidental rm -rf /*

Joined
Jun 5, 2007
Messages
274
Reaction score
5
Points
18
Location
Ypsilanti, MI
Your Mac's Specs
15" MBP 2.4GHz 4GB, iPod Classic 120GB
Soo... me being the genius that I am figured that if didn't type the Sudo in front of it it wouldn't work... turns out it did... partially. I noticed Address book poofed from my stack and immediately quit Terminal.

I think it only got to Address Book and Adium but I'm not sure. my computer is running really slow now and a lot of processor working is going on.

How much damage did I do, and what can I do to fix it?

Please help
 

chscag

Well-known member
Staff member
Admin
Joined
Jan 23, 2008
Messages
65,248
Reaction score
1,833
Points
113
Location
Keller, Texas
Your Mac's Specs
2017 27" iMac, 10.5" iPad Pro, iPhone 8, iPhone 11, iPhone 12 Mini, Numerous iPods, Monterey
I'm trying to figure out exactly what it is you did? Are you saying that you deleted address book using a command from terminal? If so, you'll have to re-install it from your original restore disk. To do that you'll need "Pacifist" in order to extract it without having to re-install everything.

CharlesSoft - software you always wished someone would write

Regards.
 
OP
TheInvsbleMan
Joined
Jun 5, 2007
Messages
274
Reaction score
5
Points
18
Location
Ypsilanti, MI
Your Mac's Specs
15" MBP 2.4GHz 4GB, iPod Classic 120GB
I typed rm -rf /*

I was trying to mess with my friend who knows what that command does just as I do I just left out the sudo thinking it wouldn't work. turns out it did... I'm just wondering without the sudo how much damage I could have actually done.

Currently I am backing all my stuff up (just in case) and then I will restore OS X.

My question is... without the Sudo command could I have even screwed up the system files? or did it only get to Address Book and Adium? and I just have to reinstall those?
 
Joined
Mar 9, 2004
Messages
9,065
Reaction score
331
Points
83
Location
Munich
Your Mac's Specs
Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2
Well without sudo, it would have had any permissions that the current user had. If you were logged in as a regular admin user, that's your home folder and Applications if I'm not mistaken...

I'd restore everything from a backup and then stop monkeying around with rm -rf ;)
 
OP
TheInvsbleMan
Joined
Jun 5, 2007
Messages
274
Reaction score
5
Points
18
Location
Ypsilanti, MI
Your Mac's Specs
15" MBP 2.4GHz 4GB, iPod Classic 120GB
*edit* as soon as I posted this iTunes finished checking my library and is now working :) so how exactly do I go about getting address book back? Pacifist?

I am logged in as an admin.

Seeing as the first thing I see in my applications folder is Adobe Bridge I'm assuming I stopped it quite quickly.

All I notice missing is Address Book and Adium.

Would this probably be all that is missing? nothing important seems to be gone. At least that I can tell.

For some odd reason iTunes will not open though it gives me checking iTunes library and doesn't do anything from there... this could be because I am doing a backup of my entire music library currently.

I don't have any backups persay I just kind of back up things selectively such as pictures, videos, music, etc. All of which have remained untouched.

Again. Is an OS reinstall really necessary? how about iTunes what is up with that?

Thanks in advance.

P.S. I don't think I will ever touch rm -rf again
 
Joined
Mar 9, 2004
Messages
9,065
Reaction score
331
Points
83
Location
Munich
Your Mac's Specs
Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2
Hmm, then try just installing Address Book with pacifist and see how you go...

Oh and might I suggest you start keeping a full backup? Even if you don't touch rm, your harddrive can still die at any time...
 
OP
TheInvsbleMan
Joined
Jun 5, 2007
Messages
274
Reaction score
5
Points
18
Location
Ypsilanti, MI
Your Mac's Specs
15" MBP 2.4GHz 4GB, iPod Classic 120GB
yes I know. Is time machine a good way to go?

How much space should I allot for a time machine partition? does it even work on a partition? because I don't have a spare external laying around.
 
Joined
Mar 9, 2004
Messages
9,065
Reaction score
331
Points
83
Location
Munich
Your Mac's Specs
Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2
yes I know. Is time machine a good way to go?

How much space should I allot for a time machine partition? does it even work on a partition? because I don't have a spare external laying around.
A backup partition on your internal drive is no good: If the drive fails, you'll just lose it along with your main partition.

If you meant on an external drive, a good rule of thumb is to make it 1.5x your internal drive if you have the space.

If you don't have that much space, you can exclude files you don't want to backup (System files, default applications, unimportant data) and make the backup partition slightly larger than the size of all your "important" files.
 
OP
TheInvsbleMan
Joined
Jun 5, 2007
Messages
274
Reaction score
5
Points
18
Location
Ypsilanti, MI
Your Mac's Specs
15" MBP 2.4GHz 4GB, iPod Classic 120GB
Gotcha... and yes of course I meant external. Haha I do know quite a bit about computers, it's kinda my major haha. But erm I just had a duhhh moment tonight. Currently everything is working just fine I got Pacifist and got my address book back and all is well. My computer is still a big sluggish but I am currently repairing disk permissions then I will reboot and hope it is better.

Again thank you 1000x for your help.
 
Joined
Mar 9, 2004
Messages
9,065
Reaction score
331
Points
83
Location
Munich
Your Mac's Specs
Aluminium Macbook 2.4 Ghz 4GB RAM, SSD 24" Samsung Display, iPhone 4, iPad 2
Gotcha... and yes of course I meant external. Haha I do know quite a bit about computers, it's kinda my major haha. But erm I just had a duhhh moment tonight. Currently everything is working just fine I got Pacifist and got my address book back and all is well. My computer is still a big sluggish but I am currently repairing disk permissions then I will reboot and hope it is better.

Again thank you 1000x for your help.
Okay, just checking about the external drive ;)

I had to think of this thread today: I was trying to write a script to delete a specifc folder: (e.g. ~/Library/Application Support/Deletethis)
But instead of rm -rf .../Deletethis I typed rm -rf ... Support/ Deletethis.

Luckily I noticed the contents of the App Support folder starting to disappear after the first few were gone!

So my point is: We've all done it! :)
 
Joined
Mar 17, 2008
Messages
6,879
Reaction score
191
Points
63
Location
Tucson, AZ
Your Mac's Specs
Way... way too many specs to list.
So my point is: We've all done it! :)

my last time was moving mp3's while on the phone.. I did mv * /mp3


from /
and I've been a unix admin/developer for well over a decade now O:) (easier fix though)
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top