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
Thanks for publishing this.
Yeah, real user friendly. Thanks again Apple.
Thanks for listing this, it was a huge help.
you save my life man.. tx a lot. cheers
Thank you for sharing this.
I’m new to Macos and you taught me something.
[...] linked to this from Brooks Andrus blog so I can store it here for [...]
Thank you for this! On my mac I have a small script I use to toggle hidden files… so when it came to a new computer I completely forgot! Thanks!
[...] Brooks Andrus » Blog Archive » Mac OS X – Show / Hide Hidden Files in Finder ? [...]
Just wanted to say thanks also. (Can’t believe I need to show/hide hidden files using the Terminal).
Thanks for the useful tip !! Indeed I was looking how to hide specific files and not all dot files, i.e. I just would like to hide the .DS_Store and localized files and still be able to see my dot files (.zshrc for example). Any idea ?
Thanks for the tip! It would be even more usable if you had the lines we could just copy/paste at the top rather than having to type them out manually from the screen shot.
For those others like me who are lazy, here they are. :)
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder
i don’t know why this command does not work for me ……….
the terminal always ask me for the user that i have to apply the command
[...] Mac OS X – Show / Hide Hidden Files in Finder Show hidden files on your mac. (tags: mac) [...]
[...] http://www.brooksandrus.com/blog/2007/03/23/mac-os-x-show-hide-hidden-files-in-finder/ [...]
I have to regularly toggle between showing all files, and hiding them. I always forget what to type too… so I wrote a program to do that with the click of a button:
Show All Files Mac
The program is free, and I hope it helps others out as well. Enjoy!
Oops, I forgot the http part:
Show All Files Mac
How can you prevent the Terminal window from opening after powering up the Mac?
Also how can you the windows platform if you have lost the password?
Thanks for your assistance.
You saved my day.
Supercool !
you helped me out bigtime !
your crap is the shit !
peace !
Yzer
Thanks for the tip! You saved me some time. It ranks high on Google and I am sure I’ll need it again and again, so please keep it online.
Thought this might help your readers – I found the following script, which will toggle between show and hide, so you can just paste the same code regardless.
Personally, I just compile it as an .app in Automator, and run it whenever I need to toggle.
#!/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
Thanks, really helpful!
Help please, I did what you advised, and now i seem to have lost everything music movies docs, Says the volumes cannot be found!!! My computer has gone back to its original settings . Please help i’m screwed!!!
[...] http://www.brooksandrus.com/blog/2007/03/23/mac-os-x-show-hide-hidden-files-in-finder/ [...]
Thanks for this. It helped me a lot when showing .htaccess files
This works for me – thanks – but I still can’t see some of the ‘dot’ files that show up on a PC. Anyone have any idea what might be going on? Thanx
worked like a charm…Thanks
sweet!! finally helped to get rid of my hidden files. I only turned them on when I was playing around with XAMPP and I couldn’t figure out how to turn visibility off again.
This simple utility does it for you.
http://www.apple.com/downloads/macosx/system_disk_utilities/showhiddenfiles.html
hello… thanks for the great tip. To toggle this option i wrote it down in a script… hope it helps:
set flag to do shell script “defaults read com.apple.finder AppleShowAllFiles”
if flag is “FALSE” then
do shell script “defaults write com.apple.finder AppleShowAllFiles TRUE”
else
do shell script “defaults write com.apple.finder AppleShowAllFiles FALSE”
end if
do shell script “killall Finder”
This makes your hard disk icon disappear from the desktop and the Finder Preferences file cannot over-ride this and make it appear
[...] originally posted by Brooks on March 23, 2007 at http://www.brooksandrus.com/blog/2007/03/23/mac-os-x-show-hide-hidden-files-in-finder/ Tagged with: Finder no comments yet « How to watch Youtube videos in high quality on [...]
Really it is very helpful one. Keep posting more hint command you know…Thanks Ashwin patil
If you want to hide a certain file or folder like in the classic Mac OS, you may use the SetFile command of Mac OS X:
To hide a file or folder, type:
SetFile -a V filename
To show a file or folder, type:
SetFile -a v filename
Great tip. Worked like a charm. I was getting frustrated with finder hiding (and not copying) my .htaccess files.
Cheers mate, really helpful!
So i had to show my hidden files when trying to recover my lost firefox bookmarks when updating to 3.0 but when i go to un-hide them entering the second command FALSE into terminal and then killall Finder i still am stuck with the hazy 50% look on all my files, ive tried restarting and everything is there something i am doing wrong where i cant change my files back?
Thanks. Came in handy!
:o)
Thanks for posting this ! :D
Thanks, just wat I needed to get some files off of a hard drive that was causing some issues.
Uber-awesome :D MERCI BEAUCOUP!!
Thanks a lot it’s really helpful
thankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyou
Here’s how to make a shell file to really simplify this:
http://macmartine.com/blog/2009/11/shell-script-to-showhide-hidden-files-on-os-x.html
Good freeware application for http://code.google.com/p/hide-unhide
Thanks! I can never remember this myself. Now it pops up at the top of a google search!
What OS versions?
[...] http://www.brooksandrus.com/blog/2007/03/23/mac-os-x-show-hide-hidden-files-in-finder/ [...]
Thanks for the help, hun.
[...] References Mac OS X – Show / Hide Hidden Files in Finder [...]