Forcing the first build of the locate database - useful on new systems
Initialising the locate database on OS X
From a fresh OS install, there is no locate database.
The database is built and automatically rebuilt at some odd hour once a week. You can force the first build by typing the following:
sudo /usr/libexec/locate.updatedb