1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Showing hidden files still not working after enabling 'ShowAllHiddenFiles'

Discussion in 'OS X Mountain Lion (10.8)' started by briandev, Sep 30, 2012.

  1. briandev, Sep 30, 2012
    Last edited: Sep 30, 2012

    macrumors newbie

    #1
    Hi, all. I've tried the following:

    new-host-3:root# defaults write com.apple.Finder AppleShowAllFiles TRUE; killall -HUP Finder
    new-host-3:root# defaults read com.apple.Finder AppleShowAllFiles
    TRUE
    new-host-3:root#

    However, even after restarting Finder and verifying this boolean value has been changed, it still doesn't show hidden files (e.g., .htaccess). Is there anything else that needs to be done? I've tried restarting as well.

    Any help is appreciated. Thanks!
     
  2. macrumors demi-god

    GGJstudios

    #2
    To show hidden files in Finder, copy and paste the following two commands into a Terminal window (press enter after each line):
    defaults write com.apple.finder AppleShowAllFiles true
    killall Finder​
    To hide hidden files in Finder, copy and paste the following two commands into a Terminal window (press enter after each line):
    defaults write com.apple.finder AppleShowAllFiles false
    killall Finder​
     
  3. macrumors newbie

    #3
    Thanks for posting. I just tried this now (since it was slightly different than what I tried) and it didn't work. After Finder restarted, I went into some files that I know contain .htaccess and I don't see them. I also don't see .DS_Store in any folders.
     
  4. macrumors demi-god

    GGJstudios

    #4
    Did you copy and paste, or just type? It's never failed to work for others. You might also try restarting your Mac.
     
  5. macrumors newbie

    #5
    I will try restarting again. I tried restarting for my initial command I typed as mentioned in my original posts. Both attempts were copy/pasted, not manually typed.

    I can verify that it is showing as true:

    new-host-3:root# defaults read com.apple.Finder AppleShowAllFiles
    true
    new-host-3:root#

    ----------

    UPDATE: I have resolved the issue. You need to enter in this command as a local user, not root. It's working now! Hope this helps someone in the future.
     
  6. Mal
    macrumors 603

    Mal

    #6
    That's because when you run the defaults command, it modifies the specified file (com.apple.Finder.plist in this case) in the current user's home directory. That means when you do this logged in as root, it does it in the root home directory, and therefore it wouldn't affect your main user account. It would work if you logged into the GUI as root, but most people don't do that often (and shouldn't).

    jW
     
  7. macrumors member

    #7
    How do you get it so that once they are showing, you can just click and edit the files (.htaccess)? I got all .htaccess files set to open with TextWrangler, but clicking it does nothing.
     

Share This Page