I always forget how to do this because I toggle this rather sporadically so I’m adding it to the public record.
To show hidden files in Finder pop open your terminal and type the text shown in the screen grab below.

To go back to hiding files we obviously just flip the AppleShowAllFiles flag to FALSE.

*Update*
As noted in the comments its nice to have the text available for easy copy and paste into your terminal.
Show:
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
Hide:
defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder
*Update 2*
You can use this script toggle between states:
# check if hidden files are visible and store result in a variable
isVisible=”$(defaults read com.apple.finder AppleShowAllFiles)”
# toggle visibility based on variables value
if [ "$isVisible" = FALSE ]
then
defaults write com.apple.finder AppleShowAllFiles TRUE
else
defaults write com.apple.finder AppleShowAllFiles FALSE
fi
# force changes by restarting Finder
killall Finder
You can also download an Automator application which will toggle hidden file visibility here:
http://www.brooksandrus.com/downloads/show_files.zip
Brooks, thank you for your selfless deed of publishing such a wonderful gem of a tip.
Please publish more..
thanks
Thanks, handy time saver
Thank you for the Automator
Thanks :)
Thanks..
Hi, thanks for the neat script.
but toggle script doesn’t work for me…I copied and pasted:
# check if hidden files are visible and store result in a variable
isVisible=”$(defaults read com.apple.finder AppleShowAllFiles)”
# toggle visibility based on variables value
if [ "$isVisible" = FALSE ]
then
defaults write com.apple.finder AppleShowAllFiles TRUE
else
defaults write com.apple.finder AppleShowAllFiles FALSE
fi
# force changes by restarting Finder
killall Finder
Did I do it write?
Ty Ty
super helpful ^^
Thanks a lot man …..
Never thought i’d say this but windows (at least the pre-metro ones) has way better file management than mac os… i mean why not have this in preferences???
And why can’t i merge two folders of the same name…
sigh
One additional tip: Make an alias of the directory (in my case the Library) Now, I can access the Library by just clicking on the alias and don’t need to perform the Terminal gymnastics just to access an old preferences file on my former back up drive.
thankQ