Skip to content

Instantly share code, notes, and snippets.

@ngarneau
Created November 11, 2011 03:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngarneau/1357137 to your computer and use it in GitHub Desktop.
Save ngarneau/1357137 to your computer and use it in GitHub Desktop.
Display on/off hidden files on mac osx
#!/bin/bash
# Simple script to show/hide hidden files on macsox using terminal
if [[ $1 != true && $1 != false ]]
then
echo Expected parameters are true or false
exit
else
if [ $1 = true ]; then
echo Showing hidden files...
defaults write com.apple.Finder AppleShowAllFiles TRUE
killall Finder
else
echo Hiding files that should be hidden...
defaults write com.apple.Finder AppleShowAllFiles FALSE
killall Finder
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment