Last Updated: February 25, 2016
·
519
· asbigger

Show/Hide Mac OSX Hidden Files

Need to see hidden files on a mac? No worries:

#!/bin/bash

current_status=$(defaults read com.apple.finder AppleShowAllFiles)

if
  [ $current_status == "YES" ]
then
   defaults write com.apple.finder AppleShowAllFiles NO
else
  defaults write com.apple.finder AppleShowAllFiles YES
fi

killall Finder # kill finder triggers restart