Skip to content

Instantly share code, notes, and snippets.

@dudash
Last active December 22, 2015 23:19
Show Gist options
  • Save dudash/f1e9d3b34dfb3e578804 to your computer and use it in GitHub Desktop.
Save dudash/f1e9d3b34dfb3e578804 to your computer and use it in GitHub Desktop.
Toggle hidden files on OSX on and off
#!/bin/bash
# Note that in file dialog boxes you can just type "CMD+Shift+."
CURRENT_VALUE=`defaults read com.apple.finder AppleShowAllFiles`
if [ $CURRENT_VALUE == 1 ] ; then
defaults write com.apple.finder AppleShowAllFiles -boolean false
else
defaults write com.apple.finder AppleShowAllFiles -boolean true
fi
killall Finder
# open /System/Library/CoreServices/Finder.app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment