It’s sometimes necessary to view and manipulate files hidden in your system. Unfortunately the Mac OS X file browser, the Finder, does not display these files by default and has no easy way to access this option. This simple hack allows you to choose whether hidden files are displayed or not.
In order to change this setting, launch the Terminal and paste in the following command:
defaults write com.apple.Finder AppleShowAllFiles YES
The next thing you’ll need to do is to restart the Finder. You can quit the Finder by issuing this command:
The Finder should restart automatically, if it does not, you can launch it from the Dock.
This command updates the user’s defaults database with the value
YES. The updated variable is called
AppleShowAllFiles and is stored in this file:
You can read the current value of the variable by issuing this command:
defaults read com.apple.Finder AppleShowAllFiles
As you can probably guess, you can prevent hidden files from being shown, by setting the value back to
defaults write com.apple.Finder AppleShowAllFiles NO killall Finder