Q: 'locate' question
I guess 'locate' is 'off' by default in 10.6.1. I went to 'locate' something and I got this"
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;">
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.
</pre>
I found that to be a remarkably helpful error message, and I followed the given instructions. My question is, Will that survive a restart, or will I have to issue the command each time I restart? And, will the 'weekly' task regularly update the locate database?
Thanks for looking.
Andy
Message was edited by: Andy Highberger
Message was edited by: Andy Highberger
Message was edited by: Andy Highberger
<pre style="
font-family: Monaco, 'Courier New', Courier, monospace;
font-size: 10px;
font-weight: normal;
margin: 0px;
padding: 5px;
border: 1px solid #000000;
width: 720px;
color: #000000;
background-color: #FFDDFF;
overflow: auto;">
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.
</pre>
I found that to be a remarkably helpful error message, and I followed the given instructions. My question is, Will that survive a restart, or will I have to issue the command each time I restart? And, will the 'weekly' task regularly update the locate database?
Thanks for looking.
Andy
Message was edited by: Andy Highberger
Message was edited by: Andy Highberger
Message was edited by: Andy Highberger
2.93 Ghz Quad MacPro G5 Dual 2.7 GHz, MBPro 2.5 GHz, iMac C2D, Mac OS X (10.6.1), PowerMac G4, Ti MacBook 867 MHz, WallStreet PB, FatMac 512KB
Posted on Oct 6, 2009 10:13 AM
by Camelot,Solvedanswer
Mac OS X
Will that survive a restart, or will I have to issue the command each time I restart?
The fact you use the -w switch with launchctl writes the change to the preference file and therefore it is persistent (i.e. it will re-enable after a reboot.
And, will the 'weekly' task regularly update the locate database?
What 'weekly' task are you referring to?
launchd will periodically relaunch the task to update the database. You can control this in the .plist:
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>3</integer>
<key>Minute</key>
<integer>15</integer>
<key>Weekday</key>
<integer>6</integer>
</dict>
i.e. run at 3:15am every Saturday morning.
Posted on Oct 6, 2009 10:17 AM