Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
defaults write com.apple.Finder AppleShowAllFiles YES

And then you need to relaunch Finder!

So here's a complete solution: Open Terminal (in Utilities) and enter

Code:
defaults write com.apple.Finder AppleShowAllFiles YES; killall Finder

(Replace YES with NO to undo the change.)
 
If you only need to see hidden files for a search, but don't want them always displayed, you can simply do a search in Finder and add hidden files as a search criteria:
ScreenCap 4.PNG
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.