Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

There are several places in Mac OS X, that don't get indexed by spotlight or the terminal locate command.

Is there a way to change that?

How can I search in places like /private?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

locate should include system files (if you enable database creation -- it's turned off by default, at least in Snow Leopard -- with the command sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist).

Spotlight does index system files, but normally leaves them out of the search results because most users want to search their files, not the OS internals. If you want to see system files in the results, you have to enable them:

  1. Start a Spotlight search by entering something in the search field in a Finder window toolbar.
  2. Add an additional search criterion by clicking the "+" button on the right.
  3. The new criterion selector will start saying something like (Kind) is (Any). Select "Other" from the attribute ("Kind") pop-up menu.
  4. This'll open a dialog with a huge list of searchable attributes, with checkboxes to control whether they appear in the standard criterion pop-up. Enable the "System Files" and "File invisible" attributes.
  5. Now select "System Files" from the attribute pop-up, and "are included" from the next one. If you want/need to, you can also add another search criterion to include/exclude invisible items (this doesn't seem to be necessary to search /private, even though it's invisible).
  6. You should now see system files in the listed results.

Note that including these options in the pop-up menu is permanent, but actually selecting them has to be re-done for each search (i.e. next time you search, you only get to skip steps 3 and 4).

share|improve this answer
    
That's good to know! –  Daniel Beck Oct 4 '10 at 17:59
add comment
find /private -name *thethingimlookingfor*

It's not indexed but it will search :)

share|improve this answer
    
This works great if I already know that what I'm looking for is in /private. Otherwise could I perform a find directly under /? Do I need any special permissions for that? –  Ardenia Oct 3 '10 at 19:59
    
Yes you can use that to search under / as well. You will need to use sudo to get access to most system folders though, plus it might take a while :) –  Naram Oct 4 '10 at 8:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.