Hiding and showing files on OSX

OSX Mountain Lion hides a lot of files that were visible in previous versions. You make them visible in the finder with a single line of code in the Terminal.

For example, this line makes the contents of the /usr directory visible.

sudo chflags -R nohidden /usr

And this one makes your Library folder and its contents visible.
sudo chflags -R nohidden ~/Library

And this one makes the main Library folder and its contents visible.
sudo chflags -R nohidden /Library

If you are setting up Apache on you computer so you can test websites before deployment, you might want to make the private folder visible.
sudo chflags -R nohidden /private/

The first part of the command, sudo, just means that you will be prompted for your computer password before the command is executed.

Sometimes I want to see all the files in the Finder so I enter this line in the terminal.
sudo defaults write com.apple.Finder AppleShowAllFiles TRUE
Restart the Finder with
killall Finder
or use Force Quit to relaunch the finder.
After I’ve done whatever it was that required access to all the files, I usually turn them back off by changing TRUE to FALSE

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.