Show hidden files in the Finder
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.
Method
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:
killall Finder
The Finder should restart automatically, if it does not, you can launch it from the Dock.
Explanation
This command updates the user's defaults database with the value YES
. The updated variable is called AppleShowAllFiles
and is stored in this file: ~/Library/Preferences/com.apple.finder.plist
You can read the current value of the variable by issuing this command:
defaults read com.apple.Finder AppleShowAllFiles
You can also access this variable by using the Property List Editor to edit the mentioned file. The Property List Editor is a part of Apple Developer Tools.
Undo
As you can probably guess, you can prevent hidden files from being shown, by setting the value back to NO
.
defaults write com.apple.Finder AppleShowAllFiles NO
killall Finder