Skip to content

Instantly share code, notes, and snippets.

@ryo0508
Created April 25, 2013 03:20
Show Gist options
  • Save ryo0508/5457275 to your computer and use it in GitHub Desktop.
Save ryo0508/5457275 to your computer and use it in GitHub Desktop.
Toggle between show or hide hidden files in MAC OS X
# ================================================================
# Toggle between show or hide hidden files in MAC OS X
# ================================================================
toggle_hidden_files() {
is_showing=`defaults read com.apple.finder AppleShowAllFiles`
if [ ${is_showing} = TRUE ]
then
defaults write com.apple.finder AppleShowAllFiles FALSE;
else
defaults write com.apple.finder AppleShowAllFiles TRUE;
fi
echo AppleShowAllFiles has been set to: `defaults read com.apple.finder AppleShowAllFiles`
echo restarting Finder
sudo killall Finder
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment