Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Automatically update locate db on-demand' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Automatically update locate db on-demand
Authored by: wallybear on Oct 07, '11 10:18:03AM

I think that considering 'old' a locatedb older than 1 hour is a little overkill, keep in mind that periodic maintenance tasks update it only weekly.
Another mean to be sure locate db (and other maintenance tasks) are regularly run is using the free PseudoAnacron (available on page).

[ Reply to This | # ]
Automatically update locate db on-demand
Authored by: baltwo on Oct 07, '11 02:19:16PM

just a couple of comments.

1. Rebuilding the database is no longer part of the weekly maintenance script. The launchd trigger, stored in /System/Library/LaunchDaemons/ as and was supposed to launch at 3:15 AM on Saturdays, has been disabled. So, if you want to rebuild the database, you have to do it manually.

2. The locate.updatedb executable is crippled, excluding some system-level items. To rebuild it so nothing's missing, you need to replace the current locate.updatedb executable with the uncrippled one from Leopard, located in its /usr/libexec/ folder, assuming that you still have an early Leopard installation or installer. I believe it was crippled in 10.5.5 (one dated 12/12/08 or earlier will work uncrippled).

Supposedly, Apple crippled it as a security measure, but since I'm on a single-user machine, there's no sound reason to preclude searching everywhere. That makes it better than Spotlight for searching for named items anywhere.

[ Reply to This | # ]