OS X / Mountain Lion hides a number of files from you, to help keep things tidier, and help make sure you don't accidentally delete anything too important. Most of the time this is useful, but sometimes it would be more convenient to be able to see all files.
The view all files Finder option can be change by setting the com.apple.finder option, called, unsurprisingly AppleShowAllFiles
I have a short shell script:
#!/bin/bash
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
and to turn it off:
#!/bin/bash
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder