Mac OS X - Show / Hide Hidden Files in Finder

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

30 Comments

  1. Tim Darach
    Posted March 29, 2007 at 9:52 am | Permalink

    Thanks for publishing this.

  2. Apple of your eye
    Posted April 7, 2007 at 12:15 am | Permalink

    Yeah, real user friendly. Thanks again Apple.

  3. Posted July 9, 2007 at 8:09 pm | Permalink

    Thanks for listing this, it was a huge help.

  4. Budi
    Posted July 20, 2007 at 1:05 pm | Permalink

    you save my life man.. tx a lot. cheers

  5. Posted August 7, 2007 at 12:48 pm | Permalink

    Thank you for sharing this.
    I’m new to Macos and you taught me something.

  6. Logan
    Posted February 6, 2008 at 12:34 pm | Permalink

    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!

  7. mnate
    Posted July 22, 2008 at 10:04 pm | Permalink

    Just wanted to say thanks also. (Can’t believe I need to show/hide hidden files using the Terminal).

  8. Sergio
    Posted July 25, 2008 at 3:34 am | Permalink

    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 ?

  9. Posted August 6, 2008 at 12:59 pm | Permalink

    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

  10. noob
    Posted August 7, 2008 at 4:10 am | Permalink

    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

  11. Posted October 1, 2008 at 3:54 pm | Permalink

    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!

  12. Posted October 1, 2008 at 3:56 pm | Permalink

    Oops, I forgot the http part:

    Show All Files Mac

  13. Alice Saling
    Posted October 22, 2008 at 5:47 pm | Permalink

    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.

  14. Christiancondin@gmx.
    Posted October 23, 2008 at 3:07 pm | Permalink

    You saved my day.

  15. Posted October 28, 2008 at 7:21 am | Permalink

    Supercool !

    you helped me out bigtime !

    your crap is the shit !

    peace !

    Yzer

  16. Posted November 2, 2008 at 10:59 pm | Permalink

    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.

  17. anonymous coward
    Posted November 6, 2008 at 3:04 pm | Permalink

    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

  18. ericmchicago
    Posted November 7, 2008 at 2:58 am | Permalink

    Thanks, really helpful!

  19. lee
    Posted December 3, 2008 at 1:19 am | Permalink

    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!!!

  20. Posted December 22, 2008 at 5:13 am | Permalink

    Thanks for this. It helped me a lot when showing .htaccess files

  21. DBA
    Posted December 27, 2008 at 7:45 am | Permalink

    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

  22. Rage
    Posted January 13, 2009 at 8:39 am | Permalink

    worked like a charm…Thanks

  23. Antonella
    Posted February 3, 2009 at 7:26 am | Permalink

    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.

  24. Brentski
    Posted February 23, 2009 at 5:04 pm | Permalink

    This simple utility does it for you.
    http://www.apple.com/downloads/macosx/system_disk_utilities/showhiddenfiles.html

  25. Gustavo
    Posted March 22, 2009 at 3:22 pm | Permalink

    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”

  26. Laird Madison
    Posted April 9, 2009 at 6:07 pm | Permalink

    This makes your hard disk icon disappear from the desktop and the Finder Preferences file cannot over-ride this and make it appear

  27. Posted May 8, 2009 at 1:40 am | Permalink

    Really it is very helpful one. Keep posting more hint command you know…Thanks Ashwin patil

  28. Posted May 23, 2009 at 8:01 am | Permalink

    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

  29. Posted May 28, 2009 at 5:23 pm | Permalink

    Great tip. Worked like a charm. I was getting frustrated with finder hiding (and not copying) my .htaccess files.

  30. James Fitzy
    Posted June 26, 2009 at 3:48 am | Permalink

    Cheers mate, really helpful!

6 Trackbacks

  1. By Mac OS X - Show / Hide Hidden Files in Finder on September 13, 2007 at 12:56 am

    [...] linked to this from Brooks Andrus blog so I can store it here for [...]

  2. [...] Brooks Andrus » Blog Archive » Mac OS X - Show / Hide Hidden Files in Finder ? [...]

  3. By Ramblings › Just another WordPress weblog on August 22, 2008 at 11:34 am

    [...] Mac OS X - Show / Hide Hidden Files in Finder Show hidden files on your mac. (tags: mac) [...]

  4. By » Mac - OSX - show / hide files in finder tip on September 9, 2008 at 10:58 am

    [...] http://www.brooksandrus.com/blog/2007/03/23/mac-os-x-show-hide-hidden-files-in-finder/ [...]

  5. [...] http://www.brooksandrus.com/blog/2007/03/23/mac-os-x-show-hide-hidden-files-in-finder/ [...]

  6. [...] 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 [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*