This should be a simple matter, but it troubled me so much.
Simply, you need to the followings, but be warned that there are slight incorrect version of command on internet, at least which didnt’ work for me on Lion.
defaults write com.apple.finder AppleShowAllFiles -bool true
Then
killall Finder
For me, if you did “YES” instead of true, it didn’t work.
from ehow (http://www.ehow.com/how_2274100_hidden-files-mac-os-x.html)