Files that start with a period symbol (.) in their name are hidden in MAC. Rename a file in MAC and add a dot (.) in the start of its name and it will be invisible to the Finder. Its similar to the Linux operating system. Removing the dot from the beginning of the name of a hidden file will make it visible again. Developers often have to work with the hidden files (e.g. .htaccess) in MAC. Here is how you can show hidden files in MAC OS X.
A very quick way to see hidden files is to use keyboard shortcut to see hidden files. This is a temporary change.
Use Command+Shift+Period keys together to reveal hidden files.
Change Finder Default Settings
You can change the default settings of Finder to always show hidden files.
Launch the Terminal from Finder -> Applications -> Utilities
For OS X Mavericks 10.9, Mac OS X 10.8 Mountain Lion, 10.7 Lion, 10.6 Snow Leopard
defaults write com.apple.finder AppleShowAllFiles TRUE
Kill and relaunch the Finder by using following command to see changes in effect.
Hidden files will be visible in Finder now. You have changed the defaults. This change will be permanent until you change it back by using following command.
defaults write com.apple.Finder AppleShowAllFiles FALSE
Kill the Finder by using command below and relaunch it to see the changes.
All hidden files will be hidden again.
Use ls command in Terminal to quickly see hidden files.
Show Hidden Files in Directory
ls -a ~/myFolder/SubFolderName
You can also directly open a hidden file by using open command:
This will open .my-hidden-file (that is currently hidden) in default app associated with it. You can also open hidden directories by using open command.