Unhiding Unix Directories

I would like to "unhide" some of the standard unix directories so that they're visible in the Finder. Is this simply a matter of editing the .hidden file?

MacBook, Mac OS X (10.6.8), Matching white Peterbilt 386

Posted on Jun 30, 2012 8:25 PM

Reply
20 replies

Jul 1, 2012 11:17 AM in response to rccharles

Oh brother, I see what I did now. Your post, rccharles, even though it was the opposite of what I was trying to do, made me go back and look at the .hidden file. My mistake was in unthinkingly editing out bin instead of usr. That is what prevented the directory being visible. But since I hadn't changed the flag on bin - which I had no intention of making visible in the first place - it did not appear in Finder, so I did not notice my mistake.


The correct answer would be:


To make a standard unix file or directory visible, remove its entry from the .hidden file, then change the visibility flag either with chflag:


sudo chflags nohidden /foo

Or with SetFile:


sudo SetFile -a v /foo

Assuming, of course, that you've added /Developer/Tools to your path.


Thanks everyone for all of your help! (though I feel a litlle foolish at the moment)

Jul 1, 2012 12:30 PM in response to sudont

The correct answer would be:


To make a standard unix file or directory visible, remove its entry from the .hidden file, then change the visibility flag either with chflag:


The correct answer is remove .hidden. I am not sure what version of the OS you are using but Snow Leopard (maybe Leopard too, never used that) doesn't even have .hidden. Tiger did. This is why I had to create that script in the first place. With Tiger all I had to do was edit .hidden.

Jul 1, 2012 12:59 PM in response to sudont

I just did an experiment on my Lion (Mac OS X 10.7.4) system.


I navigated Finder to the root directory (Finder -> Go -> Go to folder -> /


/usr showed up as soon as I executed:


sudo chflags nohidden /usr


and /usr disappeared as soon as I executed:


sudo chflags hidden /usr


The same thing happened on my Snow Leopard (Mac OS X 10.6.8) Mac mini, although when I use Finder -> Go -> Go to folder -> /, it seemed to take me to /Volumes, and not /, so I had to double click on my boot drive as listed in /Volumes before I got to root. I'm guessing this has to do with the fact that my Mac mini has a bunch of external storage drives and my Macbook Pro does not. Not what I would expect, but perhaps the Finder authors are being inventive 🙂


Either your Mac OS X version does not play the same as mine, or something else is amiss on your system.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Unhiding Unix Directories

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.