Hiding folders in Mac OS X
Andrew Garner asked me this morning if I knew of a way to hide folders on Mac OS X. I responded with the typical solution of prefixing the name of the folder with a period.
This however was not exactly what he was looking for. What he wanted was to hide the /opt folder on his Macintosh HD, the place where MacPorts installs all its stuff. I hadn’t a clue how this was done, but was sure it was just a case of /usr, /etc or /var being somehow excluded by Finder when it was listing the directory root.
A few moments later Andrew popped back on MSN and told me of this command
sudo /Developer/Tools/SetFile -a V /opt
which did exactly what he wanted. I’ve since done it to my /opt folder as well as I too have always seen it as a bit of an eyesore on my Macintosh HD.