Skip to content

Instantly share code, notes, and snippets.

@mchogan
Last active December 13, 2015 22:18
Show Gist options
  • Save mchogan/4983029 to your computer and use it in GitHub Desktop.
Save mchogan/4983029 to your computer and use it in GitHub Desktop.
Toggle visibility of hidden files and folders in Mac OS X
# Toggle Hidden File Visibility Automator Service
# 1. Create a new Automator service
# 2. Service receives no input in Finder
# 3. Add an Automator Ask For Confirmation action
# 4. Automator Run Shell Script action with below shell script
# Set the Shell to bin/sh/
is_shown=$(defaults read com.apple.finder AppleShowAllFiles)
if [ $is_shown = "FALSE" ]
then
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
else
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder
fi
@ivancucer
Copy link

Works in Yosemite. Special thanks @iCoderman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment