DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Toggle Hidden Files In Mac OS X Finder
Works in Leopard, should work in all versions of OS X.
#!/bin/bash
if [ `defaults read com.apple.finder AppleShowAllFiles` == 1 ]
then
echo "Hiding hidden files."
defaults write com.apple.finder AppleShowAllFiles -bool false
else
echo "Showing hidden files."
defaults write com.apple.finder AppleShowAllFiles -bool true
fi
KillAll Finder




