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:
Thanks for the tip, I was trying to locate a hidden .cfg file for a particular application and I couldn’t use it anymore due to conflicting settings but that command line revealed the .cfg file so now I can manually change the settings, thanks!
Awesome! thanks.
Although it would have been much easier if there was a simple tick box in the finder preferences, like there is in windows explorer.
[...] to quickly access my .vimrc and other dot files using Finder. I found a couple of posts online (here and here) that described setting a property through the command line like [...]
This was the clearest, therefore the easiest instruction on how to get my system back to “normal”! I don’t even know why the .DS_Store files started showing up everywhere… but this really was so simple. Thanks a ton!
[...] the OSInstall file in the directory path specified. The terminal commands can be found here: Mac OS X – Show / Hide Hidden Files in Finder | Brooks Andrus I should get my 10V on Monday, so I'll try using EASEUS to shrink the existing XP partition, leave [...]
Thanks,
After following your instruction I was able to locate two +100Gb files generated by iMovie that filled my HardDisk [OSX Trash] and made impossible to operate with my computer.
Now I have recovered more than 200Gb space and my system is working fine!!!
Just wanted to say thanks. I too always switch this on and off. Thanks for showing me how to switch it this time around!
Awesome mate, cheers!
It was really helpful.Thanks!!!
Thanks!! It helped a lot. Now my mac is back to “normal”
Thanks for posting this easy to understand tip. It is much appreciated.
oooooooh tanks i could recover my files from the ipod because of this info. WWWWWWWOOOOOEPIE all is not lost.
thanks to on-line information sharing!!!!
it is great.
Thanks!
[...] forum thread here gives us some good optimism, and this blog post here tells us how to show .htaccess files on a mac (thanks for the nice hack, [...]
Thank you very much!!!
Thanks For sharing great tutorial !!
[...] This article was based on: http://www.brooksandrus.com/blog/2007/03/23/mac-os-x-show-hide-hidden-files-in-finder/ [...]
I used a program to show them and now i cant get rid of it and that didnt work :)
Wow dude thank you so much. Its about fucking time someone can give clear understanding directions about how to do something. SERIOUSLY thank you.
Thank you! I couldn’t figure out why my icons were too light in the applications folder. I also couldn’t figure out how to get rid of the .DS_Store folder that was showing up. This cleaned it all up!
By using this I was able to transfer songs directly from my iPod to my new MacBook, rather than having to deal with the tedious task of backing up my iTunes library to CDs or transferring songs via a jump drive. Thanks for the helpful info!
[...] ????Mac OS X – Show / Hide Hidden Files in Finder http://www.brooksandrus.com/blog/2007/03/23/mac-os-x-show-hide-hidden-files-in-finder/ [...]
Thank you! That helped a lot!