This discussion is locked
-
All replies
-
Helpful answers
-
Nov 1, 2010 4:33 PM in response to Rob Freiby Lurch66,Try rebuilding the locate and find databases by going into Terminal and typing the following (minus the #):# sudo periodic daily weekly monthly
Of course you could also see if Spotlight can find what you're looking for, also from Terminal:# mdfind fontconfig -
Nov 1, 2010 4:59 PM in response to Rob Freiby g_wolfman,I'm fairly sure that the periodic tasks no longer update the locate database.
You'll probably have to run /usr/libexec/locate.updatedb manually, or (better) play with the /System/Library/LaunchDaemons/com.apple.locate.plist property list to ensure it's getting run properly. -
Nov 1, 2010 5:52 PM in response to Rob Freiby BobHarris,When I first tried 'locate' it told me to issue the following command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist -
Nov 1, 2010 6:35 PM in response to Rob Freiby Rob Frei,Unfortunately,
sudo periodic daily weekly monthly
didn't seem to do anything. Running:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
informed me that locate.plist is already loaded. Running:
/usr/libexec/locate.updatedb
seemed to perform an update. I noticed a lot of CPU and HD activity (and it took a while to execute). However, locate still isn't working.
Could you possibly elaborate on this Bob:
or (better) play with the /System/Library/LaunchDaemons/com.apple.locate.plist property list to ensure it's getting run properly
Not sure what you mean.
Thanks all for your help. -
Nov 1, 2010 7:26 PM in response to Rob Freiby David Wood,As g_wolfman mentioned, periodic system tasks under Snow Leopard no longer update the database; see Marcel Bresink's notes accompanying his TinkerTool System Release 2. This excellent utility provides a GUI for many system maintenance tools, including updating locate.updatedb. -
Nov 1, 2010 8:08 PM in response to Rob Freiby g_wolfman,
Could you possibly elaborate on this Bob:
or (better) play with the /System/Library/LaunchDaemons/com.apple.locate.plist property list to ensure it's getting run properly
Not sure what you mean.
Actually, that was me. I meant you might need to edit the .plist to make sure the key/value that ensures the locate database is periodically updated is set. And then reload the .plist, of course.
Unfortunately, I can't tell you off the top of my head what the particular key/value pair is...I actually use TinkerTool System myself, so I haven't any need to go I to that particular .plist and manually change that property.
I would simlarly imagine that you could use a "defaults read" command to dump the contents of that particular domain, find the current value of the property and then craft a "defaults write" command to set the property. If necessary, that is. -
Nov 2, 2010 7:43 AM in response to Rob Freiby Rob Frei,Thanks David & Wolfman.
I just dl'd TinkerTools & TinkerTool System (was not aware of these). The GUI's look helpful (in many ways). I'm running the locate DB update now. Thanks for the tip!
I believe the DB is updating fine. See my terminal output pasted in below. However, whenever I issue a locate command, nothing happens ...
$ locate ical
$
is what I get ... (instantly) ... every time ...
Do you think an environment variable isn't set properly?
Terminal Output showing locate.database latest update follows ... the time stamp here represents the update I just ran using TinkerTool System:
Last login: Tue Nov 2 09:29:28 on ttys001
_ _ __ _
/\ /\_| | | _ /__\ _ | |__
/ /_/ / _ \ | |/ _ \ / \/// _ \| '_ \
/ __ / __/ | | (_) | / _ \ (_) | |_) |
\/ /_/ \__|_|_|__/ \/ \/___/|_._/
Welcome to Darwin!
$ cd /var/db
$ ls
BRLM.db SystemKey lockdown
BootCache.data SystemKey-orig mds
BootCache.playlist bluetoothEnabled ntp.drift
CodeEquivalenceCandidates crls openldap
CodeEquivalenceDatabase dashboardadvisory.database receipts
DetachedSignatures dhcpclient samba
DirectoryService dhcpd_leases shadow
PanicReporter dslocal shadow-backup.xar
PreviousSystemFiles.plist dslocal-backup.xar smb.conf
QuickTimePlayerVersion.plist dslocal_orig.cpgz statd.status
RemoteManagement dyld sudo
RosettaVersion.plist krb5kdc vmware
Spotlight launchd.db volinfo.database
SystemEntropyCache locate.database
$ vi locate.database
$ locate ical
$ ls -l locate*
-r--r--r-- 1 nobody wheel 14730259 2010-11-02 09:28 locate.database
$