How to see hidden OS X files

To see all hidden files in OS X, open terminal and type:
 
defaults write com.apple.Finder AppleShowAllFiles YES
 
Then restart Finder (e.g. from the force quit menu).
 
To revert to normal type:
 
defaults write com.apple.Finder AppleShowAllFiles NO
 
and restart Finder again. Map