Skip to content

Instantly share code, notes, and snippets.

@vaz
Created December 23, 2015 21:54
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 vaz/1ff08ed41a392e9ed6e2 to your computer and use it in GitHub Desktop.
Save vaz/1ff08ed41a392e9ed6e2 to your computer and use it in GitHub Desktop.
Bash script to toggle showing hidden files in Finder
showAllFiles ()
{
local new old=`defaults read com.apple.finder AppleShowAllFiles`;
if [ "$old" = "TRUE" ]; then
new="FALSE";
else
new="TRUE";
fi;
defaults write com.apple.finder AppleShowAllFiles $new;
echo -n "com.apple.finder AppleShowAllFiles = ";
echo $new;
killall Finder
}
@vaz
Copy link
Author

vaz commented Dec 23, 2015

Put it in your ~/.bashrc, restart terminal, type showAllFiles to toggle it.

@vaz
Copy link
Author

vaz commented Dec 23, 2015

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