To Show hidden files in Finder:
A. Open terminal and type:
defaults write com.apple.Finder AppleShowAllFiles YES
B. Restart finder by holding the option (or PC keyboard Alt) key and right-clicking (or click-and-hold the left mouse button) on the Finder icon in the dock. Select "Restart Finder".
To Hide hidden files in Finder:
A. Open terminal and type:
defaults write com.apple.Finder AppleShowAllFiles NO
B. Restart finder by holding the option (or PC keyboard Alt) key and right-clicking (or click-and-hold the left mouse button) on the Finder icon in the dock. Select "Restart Finder".
转自:
http://hi.baidu.com/ibruce_qiao/blog/item/7b196b1485e82905c83d6de2.html