I've got a MacBook from my work and wanted to use the locate
command but I get the message:
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.
I ran sudo launchctl
and waited some time... It's been two days and I still see that same message. If I ran sudo launchctl
again I get:
/System/Library/LaunchDaemons/com.apple.locate.plist: service already loaded
Searched for the database and:
$ ls -l /var/db/locate.database
ls: /var/db/locate.database: No such file or directory
The com.apple.locate.plist is set with the predefined schedule to update on every Saturday at 3:15
<key>StartCalendarInterval</key>
<dict>
<key>Hour</key>
<integer>3</integer>
<key>Minute</key>
<integer>15</integer>
<key>Weekday</key>
<integer>6</integer>
</dict>
So it's set and it shall update once it was executed for the first time. I'm under Mojave (v10.14.2), new MacBook with SSD and Core i7. Locate should take few minutes to work on new machines, but it's not the case here.
Any ideas on why isn't working and/or how to make it work?