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



56 Responses to “ “Mac OS X – Show / Hide Hidden Files in Finder”

  1. Tim Darach says:

    Thanks for publishing this.

  2. Apple of your eye says:

    Yeah, real user friendly. Thanks again Apple.

  3. Dustin says:

    Thanks for listing this, it was a huge help.

  4. Budi says:

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

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

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

  7. Logan says:

    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!

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

  9. mnate says:

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

  10. Sergio says:

    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 ?

  11. webchick says:

    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

  12. noob says:

    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

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

  14. Brian says:

    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!

  15. Brian says:

    Oops, I forgot the http part:

    Show All Files Mac

  16. Alice Saling says:

    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.

  17. Christiancondin@gmx. says:

    You saved my day.

  18. Yzer says:

    Supercool !

    you helped me out bigtime !

    your crap is the shit !

    peace !

    Yzer

  19. 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.

  20. anonymous coward says:

    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

  21. ericmchicago says:

    Thanks, really helpful!

  22. lee says:

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

  23. Photography says:

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

  24. DBA says:

    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

  25. Rage says:

    worked like a charm…Thanks

  26. Antonella says:

    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.

  27. Gustavo says:

    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”

  28. Laird Madison says:

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

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

  30. ashwin patil says:

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

  31. Zoneh says:

    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

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

  33. James Fitzy says:

    Cheers mate, really helpful!

  34. Jonathan Roberts says:

    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?

  35. bobby says:

    Thanks. Came in handy!
    :o)

  36. Thanks for posting this ! :D

  37. Forest says:

    Thanks, just wat I needed to get some files off of a hard drive that was causing some issues.

  38. Tasha says:

    Uber-awesome :D MERCI BEAUCOUP!!

  39. Philippe says:

    Thanks a lot it’s really helpful

  40. famous_nick says:

    thankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyouthankyou

  41. Oris says:

    Good freeware application for http://code.google.com/p/hide-unhide

  42. Thanks! I can never remember this myself. Now it pops up at the top of a google search!

  43. Gary7777s says:

    What OS versions?

  44. Thanks for the help, hun.

  45. [...] References Mac OS X – Show / Hide Hidden Files in Finder [...]

Leave a Reply