Removing the Invisibility Cloak

One of my work colleagues asked me a few weeks ago what it took to make /etc show up in the Finder on the Macintosh.

I knew it was some kind of HFS+ invisibility setting – but I honestly had no clue how to change that setting. About the only thing I knew to say was suggest doing a “open /etc” from a terminal window.

Well, thanks to this article at TUAW I learned about the “SetFile” command from the developer tools.

For reasons I don’t completely I can’t seem to get it to work on /etc (which is a symlink to /private/etc in OS X – and /private/etc is already technically visible and the ‘v’ visibility parameter is only a folder attribute according to the SetFile man page) – but I can get a:

/Developer/Tools/SetFile -a v private

to work, executed in a sudo’d shell. And then at some seemingly random point (facilitated perhaps by removing /.DS_Store) the Finder realizes it can see /private

For the record GetFileInfo shows the HFS+ attributes.

(obviously the developer tools should be installed, which you should be doing by default if you are reading this blog and own a Macintosh)