Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

katharrine

macrumors newbie
Original poster
Aug 23, 2008
4
0
In a stroke of GENIUS, I deleted my /Private folder. I'm not sure how I was able to but I think I deleted some random little files in my Mac HD before that and I do recall entering my password (the administrative / master password) to authorize the deletion... So that's how I got into this situation.

I'd just also like to say that I do not have my information backed up... I know, I know for shame. My father is laughing at me now. But he doesn't know yet. Don't tell him.

What I Have Tried:

- Rebooting in Single-User mode following some code I found off a forum for someone who had only deleted their /var folder- Failed!
- Rebooting in SU mode following code off Apple Support website- Failed!
- Called 1-800-MY-APPLE - was told I could only reinstall everything- Failed!
- Went into the Genius Bar to talk to a Genius. He tried to start up remotely with an External HD- Failed!
- Was told by the Genius to take a firewire cable and hook up my computer to another Mac and start in Target Disk mode, move all my data onto there (or an external HD attached to computer 2) and then reinstall - Failed! (Reason: The second computer could not detect my computer? Indexing was taking forever but I couldn't stop Spotlight from indexing because I could not find it... My disk / the icon does not appear on the desktop. BUT, it was detected through Time Machine.)

Basically I've kind of made a holy mess of things. Can anyone help? Is ther any hope?!

Thanks for reading all that.
 
stupidly did this too. found out through trial and error that as long as you haven't emptied the trash, then you can boot off a leopard dvd and go to utilities and open terminal and then use cp command to copy it back to it's original location using something like this:

cp -R /volumes/"Macintosh HD"/users/<username>/.Trash/private /volumes/"Macintosh HD"/private

don't worry about a few socket error messages, the command will complete, and then you will hopefully be able to boot into leopard without any problems
 
I ended up taking my computer to the Genius Bar. The first time I went, the Genius told me there was nothing he could do. The second time I went, the Genius (different one) told me he could make an image / copy of my HD on an external HD, and re-install Leopard on my laptop. With that re-installed, I could drag files back from my external back onto my HD.

Thanks for the advice though. Hopefully no one else needs it. :p
 
Just did this today =( Don't have my CD on me, I didn't empty my recycle bin, need to get my computer working asap :( Anybody have any ideas for getting a terminal window open without an osx cd?
 
Whoop whoop whoop!!!

Some thorough investigation, some trial and error... and I fixed it :D Incase anyone comes into the same predicament as I did without having your CD, here's the fix!

HOLD <command + S>
- boots you into "Single user mode"
TYPE mount -uw /
- allows you to make changes to your harddrive
TYPE ditto /volumes/"Macintosh HD"/users/<username>/.Trash/private /volumes/"Macintosh HD"/private
- copies your private folder back

Congratulations, disaster avoided!!!
 
OK
so Im actually retarded when it comes to this technical stuff, and i accidentally deleted my private folder too...i havnt restarted my computer yet (thank God) and im trying to understand what Im supposed to do
Im figuring I have to:

1. Restart my computer with the install cd in it
2. Hold down command-s (??)
3. Then what??
4. enter cp -R/volumes/"Macintosh HD"/users/<username>/.Trash/private/volumes/"Macintosh HD"/private
is that right?? (enter it into WHAT?)
do i enter it just like that
space after the cp?

And then what??

Sorry, im like technologically handicapped, and dont want to restart until I know EXACTLY what I should do, because I actually RELY on my computer, and cant afford to have it (even more) down.

HELP?!?!?!!

Thanks!
 
OK
so Im actually retarded when it comes to this technical stuff, and i accidentally deleted my private folder too...i havnt restarted my computer yet (thank God) and im trying to understand what Im supposed to do
Im figuring I have to:

1. Restart my computer with the install cd in it
2. Hold down command-s (??)
3. Then what??
4. enter cp -R/volumes/"Macintosh HD"/users/<username>/.Trash/private/volumes/"Macintosh HD"/private
is that right?? (enter it into WHAT?)
do i enter it just like that
space after the cp?

And then what??

Sorry, im like technologically handicapped, and dont want to restart until I know EXACTLY what I should do, because I actually RELY on my computer, and cant afford to have it (even more) down.

HELP?!?!?!!

Thanks!
Your Terminal command is missing some spaces. Should look like this:
Code:
cp -R /Volumes/Macintosh\ HD/users/<username>/.Trash/private /Volumes/Macintosh\ HD/private
Other than that, it looks correct!
 
Your Terminal command is missing some spaces. Should look like this:
Code:
cp -R /Volumes/Macintosh\ HD/users/<username>/.Trash/private /Volumes/Macintosh\ HD/private
Other than that, it looks correct!


So say i renamed my Hard Drive to "MAC" would i put that in instead of MacintoshHD?

No matter what i try either "Macintosh HD" or "Mac" i still get alexhughes no file or directory
 
stupidly did this too. found out through trial and error that as long as you haven't emptied the trash, then you can boot off a leopard dvd and go to utilities and open terminal and then use cp command to copy it back to it's original location using something like this:

cp -R /volumes/"Macintosh HD"/users/<username>/.Trash/private /volumes/"Macintosh HD"/private

don't worry about a few socket error messages, the command will complete, and then you will hopefully be able to boot into leopard without any problems

Thank you! Worked like a charm!
 
It worked, but...

Thanks for the great advice on using the codes. Took me awhile to finally get it to work, but I just ignored the socket error messages and restarted and everything is great, except...

I'm working from a MacBook Pro and I think there was something to those socket error messages. My fonts aren't working. My font library is all great, but they are not in the font book. I use my computer for graphic design and I NEED the fonts to work in my design programs.

Please someone help!

Thanks!
 
Restore private from time machine

I also stupidly deleted my private directory and emptied the trash. By the time I realized what I was done my computer wouldn't boot.

The Snow Leopard installer wouldn't let me re-install for some reason so I got creative and it worked! Basically I just plugged in my time machine and navigated to it using terminal (cd /Volumes/Time\ Machine/). I located the private directory on the backup then copied it back to my hard drive (cp -r private /Volumes/Macintosh\ HD). The computer then booted fine. I then went and used the actual time machine interface on the computer to restore this directory since I think time machine makes incremental backups and I wasn't positive my restore would contain everything....
 
One More Bone Head Move - One more Solution

Well, I did the same thing. I needed drive space, noticed that the private folder had 25 gigs, deleted it and emptied the trash all in about 60 seconds. Then, fearing I may have done something stupid, I restarted only to find out just how stupid I was.

But I had one other thing going on that was not mentioned here so I thought I would throw in what worked for me.

First off, if you don't have a backup of your previous "private" folder, you can stop reading. You will at least need that.

For me, I was unable to boot to any CD, external hard drive and was unable to even get it into Target Disk Mode. I didn't even know it was possible to mess things up THAT bad.

After an hour of reading posts on-line I realized that one thing I had done a long time ago was set a EFI password. Some of that data is stored in the private folder, so the only option I had was to boot to the internal drive, or hold the option key down and choose another drive or CD. But it didn't matter, it would never boot.

So here is what I did, and it was a fluke that I even tried it. I had just given up and decided I would need to remove the drive and wipe it, when this occurred to me (have I dragged this out enough yet?).

I plugged a firewire cable into both my problematic laptop as well as another laptop.

I booted the machine holding down the option key. The first thing it does is ask for the EFI password. Once I typed it in, all of the possible boot devices showed up (in this case just the internal drive).

But the trick was, now that I had entered the EFI password (which was only asked for when I used the option key), I was able to press the "T" key and it immediately went into Target Disk Mode. So to be clear... after holding down the option key and being presented with the list of drives to boot from, I just tapped the "T" key and was in target disk mode.

A few seconds later the drive mounted on my other computer. I then went to the TimeMachine volume, mounted the Sparse Image on the desktop and then went to the alias called "Latest" (my latest backup was about 24 hours old). Inside there, I found the private folder and copied it back onto the machine that was in target disk mode.

I did a quick restart and it booted up as if nothing was wrong.

The day was saved!!!!

I felt like I was equal parts of stupid and brilliant all at the same time. So the day balanced itself out in the end without any super drastic measures.

I hope this helps somebody, because it was only from reading all of the other posts on multiple sites that I was able to come up with this fix myself. I just had to figure out how to put all of the pieces together.
 
I have also deleted my /private folder... and emptied the trash. And NO, I don't have any backups.

Well, i've figured that maybe I could copy the folder back another way. Since my parents also have a mac, why shouldn't I be able to copy the same folder from their mac, onto an USB, and then in single target mode/terminal copy it from the USB back to its original location? Right? :confused:

If say this works, I just change the command you guys posted to the location of the USB. How will that look?

Code:
cp -R /volumes/USB/private /volumes/"Macintosh HD"/private

Should this work?? I know i've screwed up bigtime... damn that mystical folder! Well, at least i'll try. Hope you guys can help!
 
I manage to copy the files from a USB through Terminal, with the command:
Code:
cp -rpv /volumes/"NO NAME"/private /volumes/"Macintosh HD"/private

Got the /private folder from my parents mac. Put it onto a USB and used the upper command.

Doesn't work... hmm.... am I doomed? -__-
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.