What Should I Do With Private And Opt Folders?

TuckerdogAVL

Registered
I was going crazy trying to empty my trash and kept getting a note that says, "The operation can't be completed because an unexpected error occurred (error code -8003)." So, I started to move a bunch of files out of trash to go through one by one to see if I could isolate the problem.

Lo and behold, I found these strange folders "private" and "opt."

I must have moved these into trash when I was going thru some cleanup process recently looking at large folders and saw that the private, for example, appeared to be mostly logs files. It might even have been done by ONYX.

In any event, I tried to pull the private folder out of the trash for starters and I got the message, "copying 2,650 files" so I stopped that operation.

My questions are: If these are folders that are needed, then how do I get them back to where they should be?
And if not, could these be the folders holding up the empyting process?

If they are needed, I sure am happy MACOSX stopped me before doing something stupid.
Region capture 2.png

Now, before we continue, an update: As I mentioned, I tried to drag out of the trash and stopped the operation.
The private folder is now on the desktop, nothing happens if I click on it, and if I do a search for "private" this comes up. Note the date it was created. And the private and opt folders are not appearing in the trash. And I still get the error message.

Region capture 3.png
 
Can you drag those two folders back to the trash? Try using the contextual menu with control and the mouse to move it to the trash. Then restart the computer.
 
The folders marked 'private', which included 'etc' are in the trash. There are a number of other folders and files in the trash and I can't figure out what is causing this error message:

The operation can't be completed because an unexpected error occurred (error code -8003).

I no longer see the "opt" folder in the trash, however. And it's not on the desktop either. Haven't a clue where it has gone.
 
The folder /private is supposed to live at the top level of your system disk. It contains the folders etc/, tmp/, tftpboot/, and var/. There are top level symbolic links to these, except for tftpboot/. If it is no longer where it's supposed to be, your system is in a very strange state. I urge you to restore /private and /opt from a TimeMachine backup. You do have that, don't you?

After that, do a "safe" reboot and let MacOSX clean things up a bit. Open a terminal window, navigate to your Desktop folder, and force delete the moved folder via "su rm -f private".

If that doesn't work, or you don't have a backup (!), you should reinstall the operating system.
 
Yes, I have TM.
I loaded a program, TRASHit! and emptied the trash. I then used AppZapper and deleted Trashit!

In any event, I'm running 10.6.8 and I've done complete backups to date on TM. I would like to upgrade to Yosemite Sam ... each time I decide to almost do it, I think about the hours of pain I may have to endure in attempting to get my computer back should something go wrong. And I have work to do today and this weekend and next week. LOL

So, since the computer seems to be working okay, and the trash was emptied and I've backed up using TM, do you think it's safe to go ahead and upgrade to Yosemite? Will it create/recreate the private folder? Thoughts?

UPDATE:
HD/- These are in the proper place I assume ... Region capture 6.jpg
 
Last edited:
That folder is not usually visible in the Finder. Open the Terminal app in Utilities and type this and hit return:

cd /

You are now positioned at the top level of your file system. Now type:

ls

This will list everything there. Do you see something named private or private/? You should also see etc, tmp and var - or perhaps etc@, tmp@ and var@. These are symbolic links to the same entities in private/.
 
As I showed, everything is there by simply going to the HardDrive and scrolling down. No need to launch terminal. Thanks for all your help.
 
In any event, I'm running 10.6.8 and I've done complete backups to date on TM. I would like to upgrade to Yosemite Sam ... each time I decide to almost do it, I think about the hours of pain I may have to endure in attempting to get my computer back should something go wrong. And I have work to do today and this weekend and next week.

Do you know my wife? I keep nagging her to let me upgrade her iMac from 10.6.8, but she always has an excuse to delay. I upgraded mine step-by-step from Snow Leopard to Yosemite and had zero problems. That's no guarantee ...

More advice ... Get yourself the app SuperDuper! ($27.95) and an external disk with enough capacity to hold the contents of your system disk. Use the app to create a bootable copy of your system disk on the external. Then upgrade to Yosemite. If it craps out, you can boot from the external and use the app to copy the external back to the system disk. For about $100 and 3 to 4 hours, you will either be successfully upgraded or back where you started with no loss.
 
When you say "hold the contents of your system disk" do you mean all the contents that are on the current HD? Or just a portion of that HD? And how would I find the size of the system disk currently? I may have the external drive size I need already, though I would probably need to reformat it and remove everything already on it, right? Or, could it be partioned with current data on it?
 
... do you mean all the contents that are on the current HD?
Yes, the whole thing. On your desktop, single-click the system disk icon, then right-click and select "Get Info". In the display, the "General" section, find the number labelled "Used:" and multiply by 1.5, just to make sure you have plenty of room. By the way, after the first backup, SuperDuper can do incrementals - way fast. I do this periodically in addition to TM because I'm paranoid.

As for repartitioning without data loss ... some tools (iPartition) claim to do this, but I have no direct experience. Be careful and remember - I'm paranoid.
 
Back
Top