Force Spotlight to index hidden/invisible files/folders?

Discussion in 'macOS' started by LoneWolf121188, Dec 11, 2009.

  1. LoneWolf121188 macrumors 6502a

    Joined:
    Jun 7, 2007
    Location:
    Longmont, CO
    #1
    I searched around on how to do this in 10.6, but the only things I could find were references to mdimport -f, which from what I understand is now obsolete. Any other ways to do this?
     
  2. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #2
    If Spotlight indexes the drive, that includes the system/hidden files. To search them, just add that criteria to your search.
    Picture 1.jpg
     
  3. maflynn Moderator

    maflynn

    Staff Member

    Joined:
    May 3, 2009
    Location:
    Boston
    #3
    I also just go to that folder, as well.

    For instance, I want to look for something in ~/Library. I go there first and start my search, it narrows the scope and gets me what I want faster w/o weeding through stuff I don't care about.
     
  4. LoneWolf121188 thread starter macrumors 6502a

    Joined:
    Jun 7, 2007
    Location:
    Longmont, CO
    #4
    Hmmm...I don't see that little System Files option...is that screenshot from 10.5 or 10.6? And in any case, ~/Library isn't hidden. I'm talking about folders like ~/var, ~/usr, etc.
     
  5. swiftaw macrumors 603

    swiftaw

    Joined:
    Jan 31, 2005
    Location:
    Omaha, NE, USA
    #5
    The System Files option isn't there by default, you have to add it by choosing Other from the search list then checking the appropriate Check Box.
     
  6. xUKHCx Administrator emeritus

    xUKHCx

    Joined:
    Jan 15, 2006
    Location:
    The Kop
    #6
    Spotlight changed it behaviour to the current in 10.5.

    You have to enable this option.

     
  7. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #7
    It's the same in 10.5 and 10.6, as xUKHCx said. The steps xUKHCx quoted will enable you to find system files in a search. If you're talking about showing the hidden files and folders in Finder, type the following in Terminal, pressing Enter after each line:
    defaults write com.apple.Finder AppleShowAllFiles TRUE
    killall Finder​
    To hide them again, repeat the process, replacing TRUE with FALSE
     
  8. amitseven macrumors newbie

    Joined:
    May 15, 2010
    #8

    this looks like it should solve my 50-gig mystery, but it didn't work with a simple cut and paste into the terminal window. sorry, newb here, any details i'm missing?
     
  9. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #9
    Did you paste one line at a time, pressing enter after each?
     
  10. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #10
    You may have better luck using the form that specifies the type of the data:

    defaults write com.apple.finder AppleShowAllFiles
    -bool TRUE

    [otherwise 'TRUE' might get written as a string ("true") instead of a boolean (1).]

    Edit: if that doesn't "work" immediately, try relaunching Finder.
     
  11. GGJstudios macrumors Westmere

    GGJstudios

    Joined:
    May 16, 2008
    #11
    The command will work, with or without the -bool
    However, I'm guessing he forgot to relaunch Finder afterwards.
     
  12. amitseven macrumors newbie

    Joined:
    May 15, 2010
    #12
    tried it again and it worked - files that were previously invisible can now be seen. library says 53 gigs though, and i can barely account for half that. the search continues...
     
  13. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #13
    Historically true.

    However -- around the time Leopard was released -- some users began reporting it had stopped working, and folks (in a few threads around that time) speculated that Apple may have disabled that particular hack. But then the solution turned out to be that simply specifying the -bool type made it work again. In any event: including the type specification is the "canonical" form, and should be encouraged. [i.e., i wouldn't expect it to work otherwise.]
     

Share This Page