Sep 16

Building the locate database on Mac

Posted by James Netherton | Sunday 16 September 2007 5:00 AM | In Mac

When I'm on the command line in the *nix world, I prefer to use the locate command for finding files and directories over the find command.

The first time you try and use locate, you'll probably be presented with something like:

locate: no database file /var/db/locate.database.

You need to build the locate database before using the command. Here's how you do it on the Mac....

sudo /usr/libexec/locate.updatedb

It will take a while to complete but you'll be able to use the locate command afterwards.

 

0 Comments

[Post comment]


Leave a comment








Captcha text