When Finder Needs to Show ALL!

This is just a quick note regarding some useful commands if you are a Mac User who uses their Mac for development.

Sometimes you want to get to a file, or see if one was created, but you can’t because the file in question is prefixed with a ‘.’ (e.g. .keystore, .profile, etc…). I personally ran into this when I was having to create https keys, which creates a .keystore file. I needed to find the file to confirm it was created, but I couldn’t until I stumbled across these nifty commands.

To see all files on your system, even the private ones, go to a command line and type:

defaults write com.apple.finder AppleShowAllFiles -bool true

Then to see the files you will need to re-launch finder, but since you are on the command line just go ahead and enter this command:

killall Finder

This command re-launches finder and all the items are now visible.

To return Finder to it’s previous state, of not showing all the files, go to the command line and type:

defaults write com.apple.finder AppleShowAllFiles -bool false

Then re-launch Finder with ‘killall Finder’.

I recommend this last step so that you don’t have to stare at all the ‘.DStore’ files and to keep you from accidentally doing something bad to your Mac.

Cheers!