Show Hidden Files on a Mac

Q

I’m installing Drupal on my site and didn’t get very far before I ran into an issue. The tutorial on the Drupal website says I need to make sure my hidden files are visible before uploading to my server because apparently there’s one hidden file that’s very important in order to make sure everything works properly. I don’t see an option in the Finder menu. How do I do it? I’m on a Mac, by the way.

A

OS X hides files that begin with a “.”, for example “.htaccess”. These are hidden by default because it’s very important you don’t mess with them! If you promise not to edit these files, I’ll tell you how to make them visible.

Promise? Okay.

The quickest way to accomplish this is to type “Terminal” in Spotlight. In Terminal, type (or copy) this line:

defaults write com.apple.finder AppleShowAllFiles TRUE
Hit “Enter”, then type
killall Finder

Open a new Finder window (don’t use one that was previously opened) and you’ll see your hidden files. Once you’re done with the files, it’s best to go back into Terminal and hide the files. Type:

defaults write com.apple.finder AppleShowAllFiles FALSE
Hit “Enter”, then type
killall Finder

The difference is that you’re using “TRUE” to show the files, and “FALSE” to hide the files.

3 Comments

  1. Comment by Shawn Stone on April 16, 2008 4:10 pm

    How nice! Knew about hidden files on the Mac (Unix admin for many years), but never knew how to get Finder to see them, except by using the Go to Folder menu to see hidden folders, of course. What a handy thing to know! (I promise to use this knowledge for good — nor for evil, Cali.)

    -Shawn

  2. Comment by Tony Meyer on April 21, 2008 6:55 pm

    There are two types of hidden files on OS X (one inherited from earlier Mac OS, one inherited from Unix). Gruber explains all here: http://daringfireball.net/2008/04/the_invisible_bit

  3. Comment by robertbigelow on May 9, 2008 11:12 am

    Cool. Until now, all I’d known to do is to open Terminal.APP, enter “ls -a” to reveal the hidden DOT files. ^-^~

Comments RSS

Leave a comment

    Paid by Pixels


    Google


    follow CaliLewis at http://twitter.com


  • Calendar

    • September 2008
      S M T W T F S
      « Aug    
       123456
      78910111213
      14151617181920
      21222324252627
      282930  
  • Dear Cali,

    Add to Google Reader or Homepage

    Add to Technorati Favorites

    Add to My AOL

    Add to netvibes

    Subscribe in NewsGator Online