iOS Apps, Amazon Webservices, HTML, CSS, Javascript, PHP

Show hidden files Mac OS Lion

To enable hidden files/folders in finder windows:

  1. Open Finder
  2. Open the Utilities folder
  3. Open a terminal window
  4. Copy and paste the following line in => defaults write com.apple.Finder AppleShowAllFiles YES
  5. Press return
  6. Now hold ‘alt’ on the keyboard and right click on the Finder icon
  7. Click on Relaunch

You should find you will now be able to see any hidden files or folders. One you are done, perform the steps above however, replace the terminal command in step 4 with => defaults write com.apple.Finder AppleShowAllFiles NO

Notice that the /tmp, /usr, and /var directories now show up in the Finder. You’ll also discover that you can see your Unix “dot files,” such as .bashrc, in the Finder.

So what are the downsides of this trick? Well, you’ll see every hidden file on your system, which means that you’ll see a .DS_Store file in every directory. And by having every file visible, it’s that much easier to make a dumb mistake and accidentally delete one (though the truly important files are system-owned, making it much harder to do something stupid to them). Finally, as you can see in the above screenshot, all of your folder icons (in 10.4, at least) will be dimmed. However, if you work with Unix files a lot, you may find these tradeoffs worth it for the increased ease of use.

If you tire of the dimmed folders and other downsides, just open Terminal and repeat the command, but change YES to NO, then press Return again. You’ll need to relaunch the Finder again, but when you do, everything will be back to normal.

Leave a comment