Skip to content

Instantly share code, notes, and snippets.

@RickCogley
Created February 19, 2016 09:52
Show Gist options
  • Save RickCogley/fcb96f768423a0273673 to your computer and use it in GitHub Desktop.
Save RickCogley/fcb96f768423a0273673 to your computer and use it in GitHub Desktop.
Toggle Hidden Files in Mac OS X Finder
#!/bin/bash
#
# Author : Rick Cogley
# Created : 19 Feb 2016
#
showallfiles=$(defaults read com.apple.finder AppleShowAllFiles)
case "$showallfiles" in
1|TRUE|True|true|YES|Yes|yes) defaults write com.apple.finder AppleShowAllFiles -boolean false
echo Hidden files covered
;;
*) defaults write com.apple.finder AppleShowAllFiles -boolean true
echo Hidden files showing
;;
esac
killall Finder
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment