If there are hidden files on your Mac computer that you need to access, you can make them visible at any time using a single command in Terminal. This quick, straightforward bit of code instructs Finder to display all files and folders, including those that were meant to be hidden from view. In OS X Yosemite, the command takes effect immediately. In earlier versions, like OS X Mavericks, you may need to relaunch Finder before the hidden files become visible.
Close all the Finder windows. Launch Terminal by pressing "Command-Space" to open Spotlight. Type "terminal" in the Search field and press "Return."
Type "defaults write com.apple.finder AppleShowAllFiles YES" in Terminal and press "Return." This command directs Finder to show all files, whether they are hidden or not.
Launch a new Finder window by clicking the "Finder" icon in the Dock. If you are using OS X Mavericks or earlier, you may have to manually relaunch Finder before you can see hidden files. To do this, hold the "Alt" key while right-clicking the Finder icon in the Dock and select "Relaunch." Hidden files and folders are grayed out; however, they are now visible and accessible.
Hide the hidden files again by using the same line of code with "NO" at the end, instead of "YES." Type "defaults write com.apple.finder AppleShowAllFiles NO" and press "Return."
Open a new Finder window to verify that the hidden files and folders are no longer visible. If you still see them using OS X Mavericks or earlier, relaunch Finder by Alt-right-clicking the Finder icon in the Dock and selecting "Relaunch."
Never modify, move or delete hidden files or folders unless you are certain of the consequences. Altering these files in any way can cause apps or your computer to malfunction. Always perform a full backup of your Mac before altering any system files.