PDA

View Full Version : HELP! Terminal screwup ate my mail & dock prefs!


colinr
04-05-2002, 11:01 PM
Okay, to cap off a week of hell at work, I attemped to use this script (http://groups.google.com/groups?hl=en&selm=3CA9BD34.5050001%40tanjm.atsign.post1.com), on one of the machines there and royally screwed up.

I unintentionally copied the script in the post, along with all of the >'s before each line, directly into the Terminal. Do'h!

The machine froze almost instantly, thereby forcing a restart. Now the dock does not contain any of the alias's that were placed there before, and the mail app icon respondes by asking me to setup my NEW account. What happened to the OLD one!?! :eek:

I should mention that after the restart I then could see the echo, exit, if, and sudo icons among the other folders on the drive. Their icon is a blank page.

Did I totally screw myself? I'm hoping I merely relocated the prefs files (or something along those lines, i.e. easily fixable) and can do it without having to reinstall. I try to keep out of the Terminal as much as possible, so I'm not sure what to do now.

I have a machine running Classic that I can connect to via firewire for file sharing, etc. I just need to know what to do!!


Thanks for reading my plea!

colinr

WillyT
04-06-2002, 05:23 AM
EVERYONE

DO NOT COPY AND PASTE THE ABOVE SCRIPT TO YOUR TERMINAL

colinr

yep the killer was evidently the (rm) command which I will not repeat here fearing you may copy and paste again.

So just exactly what directory were you in? I would suppose it looks plenty empty now.

Assuming you were in your home directory(ie you didnt do a cd in the terminal)
Then you have probably removed ALL your preferences among other things.

Exacty what was dammaged may depend on just how much of the script and other text was pasted. Also this clip almost certainly had carriage returns at the end of each and every line.(instead of line feeds or newlines)

Yes colinr bad things happened partially because of the bare remove (rm) everything command which should have had the complete file specification instead of just the cd ahead of it.

I will now attempt to repair one of my test users

:rolleyes:

Willy

WillyT
04-06-2002, 09:33 AM
colinr

This may get you most of the way out of this mess. But of course you probably lost all of your home directory. If you are REALLY lucky Norton Utilities UnErase may fix this. I have a doubt. You will be looking for gobs of stuff. Don't worry so much about the prefs(easily recreated but a pain (most of these are backwards urls com.apple.finder.plist)) as your documents are probably also gone and harder to replace. If ANY prefs files recovered are suspect don't use them as apps will rebuild good default prefs.

After recovering as much as possible or failing that, create a new scratch user NOT admin. Login as the new user then log out and back in as your admin user. Delete the new user in the users preferences. Move each folder from the scratch deleted folder into YOUR home folder. Fill them up with whatever you managed to save with UnErase.