How to show hidden files in MAC OSX Mavericks

This worked for me in Mavericks, probably works for earlier versions as well:

Open the Terminal

write this: 

defaults write AppleShowAllFiles YES

and intro.

Now refresh the Finder: right-click on the Finder icon and select “refresh”

Thank you Mikesel for the explanation: