Updating the locate database one time only in Mac OS X

‹ Fifteen-story building constructed in six days | Smell printer 2011 ›

If the locate database hasn't been created yet on a Mac OS X 10.6 (Snow Leopard) computer, 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.

appears.  If instead of running it repeatedly, you just want to update the database a single time only, updatedb is located in /usr/libexec/locate.updatedb, so you can run sudo /usr/libexec/locate.updatedb instead

Subscribe to All Posts - Wesley Tanaka