Why can I see the "private" folder in Macintosh HD?

Discussion in 'macOS' started by 0dev, Dec 12, 2010.

  1. 0dev macrumors 68040

    0dev

    Joined:
    Dec 22, 2009
    Location:
    127.0.0.1
    #1
    In the root of my HD, I can see a "private" folder, which apparently was created in September of this year.

    Isn't this a system folder which is meant to be hidden? And shouldn't it have been created before then?
     
  2. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #2
    To show hidden files in Finder, enter 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, enter the following two commands into a Terminal window (press enter after each line):
    defaults write com.apple.Finder AppleShowAllFiles FALSE
    killall Finder​
     
  3. 0dev thread starter macrumors 68040

    0dev

    Joined:
    Dec 22, 2009
    Location:
    127.0.0.1
    #3
    Hidden files are not showing, I just seem to be able to see the private folder as if it's a normal one.
     
  4. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #4
    What's in the folder? Have you checked permissions on it?
     
  5. 0dev thread starter macrumors 68040

    0dev

    Joined:
    Dec 22, 2009
    Location:
    127.0.0.1
    #5
    Four folders: etc, tftpboot, tmp, and var are in it.

    The permissions say the system can read and write, everyone else can only read.
     
  6. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #6
    That sounds like the legit Private folder. I'm not sure why it would be visible.
     
  7. 0dev thread starter macrumors 68040

    0dev

    Joined:
    Dec 22, 2009
    Location:
    127.0.0.1
    #7
    It says it was created in September of this year, any idea how that's possible? My last install was way before then.
     
  8. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #8
    Try showing hidden folders and see if another private folder shows up. It might be that OS X had to re-create it, but I couldn't begin to guess why. Mine shows to be created in Dec 2007 (before I got my Mac) and last modified in Feb 2008, also before I got my Mac.
     
  9. 0dev thread starter macrumors 68040

    0dev

    Joined:
    Dec 22, 2009
    Location:
    127.0.0.1
    #9
    Nope, that's the one and only private folder I have.
     
  10. xyzzy-xyzzy macrumors member

    Joined:
    Sep 19, 2010
    #10
    Do not delete /private!

    The stuff in there is part of the OS and required. Normally Apple normally keeps it (finder) hidden from "prying eyes" ;) I don't know how it became finder visible for you.

    FWIW, if you have the Developer Tools installed you can execute the following commands from the Terminal to make it hidden again:

    sudo setfile -a V /private
    killall Finder

    The second command is just to relaunch the finder at which point /private should be hidden.

    If you don't have the Developer Tools installed, don't let it bother you. It's just one of many other (hidden) directories in the root directory. It doesn't matter whether its invisible or not. Only that what's in there stay there!

    Also, I believe there a a few third party apps to selectively hide/unhide files. I just don't recall any specific one at the moment.
     
  11. Jolly Jimmy macrumors 65816

    Jolly Jimmy

    Joined:
    Dec 13, 2007
    #11
    You can do this without dev tools installed though I think it only works for folders unlike setfile.

    Try this terminal command :

    sudo chflags nohidden /private
     
  12. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #12
    Close... but i believe the OP wants to hide an already visible item:

    sudo chflags hidden /private

    ...which works on regular files as well as directories.
     
  13. Jolly Jimmy macrumors 65816

    Jolly Jimmy

    Joined:
    Dec 13, 2007
    #13
    Oops, yes of course that's what I meant :rolleyes:

    Maybe it's apps it doesn't work on then...
     
  14. 0dev thread starter macrumors 68040

    0dev

    Joined:
    Dec 22, 2009
    Location:
    127.0.0.1
    #14
    Thanks for telling me how to hide it, I'll do that now.

    Any idea why it was supposedly created just a few months ago, though?
     
  15. xyzzy-xyzzy macrumors member

    Joined:
    Sep 19, 2010
    #15
    My guess is that whoever/whatever modified /private to be visible caused it's mod date to be changed too. Look at that date too see if it possibly jogs your memory of what you may have been doing on that date (yeah, I know, I hardly remember what I was doing yesterday :D).
     

Share This Page