Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save StudioEtrange/32f480fbaf55e4b30a4b to your computer and use it in GitHub Desktop.
Save StudioEtrange/32f480fbaf55e4b30a4b to your computer and use it in GitHub Desktop.
Apple MacOS -- Finder show Hidden Files switch
#!/bin/bash

val=$(defaults read com.apple.Finder AppleShowAllFiles)

if [ "$val" == "1" ]; then
	defaults write com.apple.Finder AppleShowAllFiles -string 0
	killall Finder
fi

if [ "$val" == "0" ]; then
	defaults write com.apple.Finder AppleShowAllFiles -string 1
	killall Finder
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment