Tag Archives: Mac

Show/ Hide Hidden Files In Mac Finder

The first thing you notice in Mac Finder is there is no way to show hidden files. In Windows Explorer or Gnome this is in the menus. On mac you need to set a environment variable called “com.apple.finder AppleShowAllFiles” to toggle the state of hidden files.

I manually changed this a couple of times, but its annoying to do all the time. So I thought of adding it to a bash script to make things easier.

#!/bin/bash

SHOW_FILES=`defaults read com.apple.finder AppleShowAllFiles`

if [ $SHOW_FILES = "FALSE" ]; then
	defaults write com.apple.finder AppleShowAllFiles TRUE
else
	defaults write com.apple.finder AppleShowAllFiles FALSE
fi
killall Finder

References
Mac OS X – Show / Hide Hidden Files in Finder