Display Hidden (dotfiles) in OS X Finder

Showing hidden dotfiles in Finder

Showing hidden dotfiles in Finder

By default, files beginning with a dot (like the .DS_Store file prevalent in nearly every OS X directory* see note below on the awesome Asepsis) are hidden in OS X’ Finder. To enable this, use the following steps:

  1. Open Terminal found in Finder > Applications > Utilities. (or use spotlight CMD+space > Terminal
  2. In Terminal, paste the following:

    defaults write com.apple.finder AppleShowAllFiles TRUE

  3. Press enter
  4. Now you need to reload Finder. I personally just type killall Finder in terminal and let Finder restart itself. An alternative is to hold alt (option) on your keyboard, then right click on the Finder icon in the dock and click Relaunch to restart Finder. Now you should be able to see dotfiles such as .DS_Store, .htaccess or .vimrc in Finder.
  5. To revert/disable this behavior, simply run the same command in the console passing TRUE instead of FALSE:

    defaults write com.apple.finder AppleShowAllFiles FALSE

Used this post as reference for this post. Contains more details and a shell alias to toggle hidden files on/off

Note that you may substitute TRUE/FALSE with YES/NO in the above commands.

* To avoid having .DS_Store contaminating your entire OS X folder structure, I recommend highly Asepsis.