If you are in need to access hidden files then you can use these following two ways to do the same.
Show Hidden Files on your Mac
Launch the Terminal and enter these commands exactly as shown. The first command activates the ability to see the hidden files:
defaults write com.apple.Finder AppleShowAllFiles TRUE
Now you must relaunch the Finder by killing it, this is how the changes take effect:
If you want to hide hidden files again (those preceded with a .) and go back to the default Mac settings, you can just type the following:
defaults write com.apple.Finder AppleShowAllFiles FALSE
Again you will need to kill the Finder so that it can relaunch for changes to take effect:
That’s all there is to it!
Show Hidden Files on your Mac through the Terminal:
Another way to quickly see hidden files is by using the ls command within the Terminal, at the command line type the following:
The -a flag tells the ls (list) command to show all contents, including hidden files. You then just have to specify a directory if you want to see the hidden files in it:
ls -a ~/Sites/betasite
This method does not effect the Finder or the visibility of hidden files outside of using the -a flag.
Show Hidden Files in a Mac Save Dialogue:
You can quickly show all hidden files in any Mac OS X save dialogue box by hitting Command+Shift+Period
NOTE: This works in Mac OS X 10.6 and later only