Skip to content

Instantly share code, notes, and snippets.

@kouichi-c-nakamura
Last active October 30, 2015 13:34
Show Gist options
  • Save kouichi-c-nakamura/2e13ddd42fd579f9b137 to your computer and use it in GitHub Desktop.
Save kouichi-c-nakamura/2e13ddd42fd579f9b137 to your computer and use it in GitHub Desktop.
Mac OS X: Toggle_AppleShowAllFiles
S1=`defaults read com.apple.finder AppleShowAllFiles`
C1='defaults write com.apple.finder AppleShowAllFiles -boolean'
# spaces within brackets are important
if [[ $S1 == '1' ]]; then
$C1 false
elif [[ $S1 == '0' ]]; then
$C1 true
else
# does not exist
$C1 true
fi
killall Finder
@kouichi-c-nakamura
Copy link
Author

Make it as a Automater application with "Run Shell Script" option.

@kouichi-c-nakamura
Copy link
Author

This toggles the logical value of com.apple.finder AppleShowAllFiles.
You can hide or show invisible files and folders in Finder of Mac OS X.

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