|
|
10.4: Create Spotlight indexes for networked volumes
i just found this hint and read through the comments and was saddened by the reports that this wouldn't work for samba mounted shares. i decided to try it anyhow, and was joyous when it worked. i then decided it was too much work to do this every time my computer is re-connected to the "work" network, so i wrote a script and put it in root's crontab. (note: you may be not want to do this, as it involves a lot of root activity). here's the shell script:
i chmod +x'd the script, put it at /var/root/reindex.VOLUME_NAME, and added the following to root's crontab:
this basically checks every five minutes of the workday if it needs to re-enable indexing on my SMB mounted share and turns it on if it isn't already. and keeps a log on its activities for debugging purposes. i've already removed those lines as i don't need to keep an eye on it after i know it's setup and working properly. note: figuring out how to do all this as root is left as an exercise to the reader. i don't want to be responsible for anyone hosing their system :)
10.4: Create Spotlight indexes for networked volumes
Instead of polling each minutes, its now possible with Tigers new launchd to only run commands when a specific folder changes (like /Volumes). Here is a small example of how I enable indexing when I mount my "stuff" smb volume. Two files are involved, first a Launch Daemon config file:
This basically tells the daemon to run the script "/usr/local/bin/enableindexing.sh" when something in /Volumes is changed.
My "/usr/local/bin/enableindexing.sh" scripts look like this:
If your smb volume is not called stuff, you might want to change the script a bit :)
To tell the Launch Daemon about this new script, either reboot or do "sudo launchctl load /Library/LaunchDaemons/enableindexing.plist"
10.4: Create Spotlight indexes for networked volumes
Very interesting, but what happens if the volume is an automount that mounts on login? e.g. in a Workgroup Environment
10.4: Create Spotlight indexes for networked volumes
You are KING! That works great!
10.4: Create Spotlight indexes for networked volumes
This works great, and I can verify that my SMB shared files are indexed with:
However neither the spotlight menubar interface or mdfind searches the indices that contain these SMB volumes. This is a great tip to keep my SMB volumes indexed, but if I can't search these indices then what's really the point? Any help appreciated.
Thanks, matteus
10.4: Create Spotlight indexes for networked volumes
To search on them you first cmd-f to bring up a find window and then click "servers"... that will search any mounted drives. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|