Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.