How do I view/edit hidden files on the Macintosh?

By default, the Finder hides files and folders whose name start with dot as well as many of the standard Unix folders such as /usr. This is very annoying when you need to muck around with these files and folders. For example, to view the .subversion/config file you have to either use an arcane Unix command line editor like pico or find an editor that allows you to edit invisible files (such as BBEdit). It is also annoying when you need to root around the Unix folder to discover where some cryptic file lives.

If you are not a Unix jockey but need to explore these folders, you can force the Finder to display hidden files. In the Terminal, execute:

defaults write com.apple.Finder AppleShowAllFiles TRUE

killall Finder

The second line will force Finder to restart so that the setting you changed takes effect.

If you wish to revert back, execute:

defaults write com.apple.finder AppleShowAllFiles FALSE

killall Finder

Back to top