Show Hidden Files in Mountain Lion

This should be an option that’s available through the Finder preferences, but it’s not. Odd. Anyway, here’s how to do it. Open up a shell and run the following command:

defaults write AppleShowAllFiles YES

To undo:

defaults write AppleShowAllFiles NO

To check to see if the option is set:

defaults read AppleShowAllFiles

To see the settings above take effect, you’ll need to hold the alt key and right-click on the Finder icon on your dock then click on Relaunch.