Last active
May 29, 2025 20:35
-
-
Save ttscoff/76bcf51f2e5eadd7a97280d93fad70ad to your computer and use it in GitHub Desktop.
Bash script to show/hide invisible files on macOS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
while test $# -gt 0; do | |
case "$1" in | |
hide) | |
defaults write com.apple.finder AppleShowAllFiles FALSE && killall Finder | |
;; | |
show) | |
defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder | |
;; | |
*) | |
echo "usage: invisi [hide|show]" | |
;; | |
esac | |
shift | |
done | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment