Sometimes you need to access files that are normally hidden by default, but these files can sometimes be critical to the proper operation of the operating system and are therefore hidden for a reason. This means that it isn’t always easy to “unhide” these files as developers want to try to prevent less experienced computer users from deleting things accidentally. However, if you’re a geek then chances are you know exactly what you’re doing and you need direct access to hidden files in OS X.
Fortunately, “unhiding” files in OS X is very easy. Just open Terminal and enter the following command.
defaults write com.apple.Finder AppleShowAllFiles YES
If you find you no longer have the need to view hidden files, you can hide them again by adding a “NO” at the end of the command.
defaults write com.apple.Finder AppleShowAllFiles NO
Once you have entered either one of these commands, you need to relaunch Finder in order for the changes to take effect.
One of the easiest ways to relaunch Finder is to hold down the “Option” Key and then click and hold the “Finder” icon. You can also hold down the option key and “Right-Click” the Finder icon. You should see the option to relaunch. After you relaunch Finder, you should see your changes take effect.