Showing posts with label locate.updatedb. Show all posts
Showing posts with label locate.updatedb. Show all posts

Wednesday, January 4, 2012

Mac updatedb to enable locate command

The first time to call locate command, one will 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.


In order to use locate command, the database should be created with the command:

sudo /usr/libexec/locate.updatedb