Mac OS X is a Unix-based operating system and because of that, it comes with a directory structure that is similar to the Unix operating system. What this means is that you will have directories like "etc", "var", "usr" etc. at your root. At this point some of you may think I am sprouting nonsense. Those directories do not even appear in the Finder. What am I talking about?!

Well, here is the thing. Those directories do exist but however, they do not appear in the Finder and are well hidden away from the UI of the Mac OS X. These directories contain important files for the OS and the average user would never have the need to mess with the content inside them.

I use MacPorts to manage my command-line open-source software on my Mac. By default, MacPorts installs the software to the directory "/opt/local". It creates a directory "opt" and that directory appears in the Finder. Thankfully there is a way to hide this directory from the Finder like the ones mentioned earlier.

There are two useful tools that comes with the Developer Tools: GetFileInfo and SetFile. They can be found in this directory: /Developer/Tools/

To hide any directory (in this case, the "opt" directory) from the Finder, run the following command in Terminal:

sudo SetFile -a V /opt

To view the file attributes of a file or directory, run the following command:

GetFileInfo /opt

In this example, you can see that the directory "/opt" has an uppercase "V" in its attributes. This flag indicates that the directory is to be hidden from the Finder.

What others think

Rekans

Rekans
Oct 04 2008

sudo SetFile -a V /opt/
Bus error

I got that error.
I dont' know if this help but I also can't disable root account on NetInfo.

Thx

BigEvilEmpire

BigEvilEmpire
Oct 04 2008

I am not too certain about this but I am guessing that it could be some kind of permission error. You might want to check out the Apple Support discussion board.

You could try booting up with your install disc, launch Disk Utility and repair the disk and permission.