[X4U] "Searching" question under 10.4

John Baltutis baltwo at san.rr.com
Wed May 10 12:02:26 PDT 2006


On 05/10/06, Lee Licata <lazilicata at gmail.com> wrote:
>
> I have been following this thread quite closely.
>
> So, I tried something.
>
> I went to my hard drive, System> Library> CFMSupport and picked the 
> file "CarbonLib" as an guinea pig.
>
> I then went to Spotlight to search that file.
>
> Nope, Nada, never found.
>
> Then, using the Find command, did the same.
>
> Same results.
>
> Then, as suggested by a previous poster, reconfigured a specific Find 
> routine where I manually entered both the System folder and the 
> Library folder as specific places to search.
>
> Re-performed the search.
>
> Nope, Nada, etc. etc.
>
> So, am I doing something wrong? Is there another way to search? Or,
> did Apple just make searching/finding such files not possible?

The following is based on a hint by Tim Wilson-Brown. As always, use it at your
own risk.

To force Spotlight to search in excluded places, you need to modify the
_rules.plist file stored in the hidden .Spotlight-V100 directory.

Do this while logged into an admin user account:

Launch the Terminal app.
Enter this command, substituting your user shortname for <username> (without
the brackets), hit the return key, enter your password (type it in carefully
because it won't show up on the screen), and hit the return key:

sudo cp /.Spotlight-V100/_rules.plist /Users/<username>/Desktop/_rules.plist

This copies the _rules.plist file to your desktop. Now, select it, CMD+D tomake
a backup copy, CMD+I, and change its owernship from system, with no access for
you, to ownership to you by clicking on the lock, entering your password, and
selecting your user shortname. That should give you Read & Write access. Drop
the file onto TextEdit and add whichever directories you wantto search to the
INCLUDE list. You can see what yours currently looks like with this command:

sudo cat /.Spotlight-V100/_rules.plist

My modified _rules.plist file looks like this, which allows me to search the
developer docs and a whole lot more:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
        <key>EXCLUDE</key>
        <array/>
        <key>INCLUDE</key>
        <array>
                <string>/System</string>
                <string>/Library</string>
                <string>/Developer/ADC Reference Library</string>
                <string>/etc</string>
                <string>/private</string>
                <string>/usr</string>
                <string>/bin</string>
                <string>/sbin</string>
        </array>
        <key>NOTE</key>
        <string>Specify paths to include or exclude, preceeding rules which
target user-homes with ~/</string>
</dict>
</plist>

After changing the _rules.plist file to suit your needs, save it, select it,
CMD+I, and change the ownership back to system, and click on the lock.

Enter this command and replace the original file with the one you modified:

sudo cp /Users/<username>/Desktop/_rules.plist  /.Spotlight-V100/_rules.plist

Restart and note that Spotlight will start reindexing. When it finishes, you
should be able to search for anything located in the now included directories.




More information about the X4U mailing list