locate is a search tool for the command-line as well for Mac OS X
$ cd /usr/local/bin $ ln -s /usr/libexec/locate.updatedb updatedb
Restart the Terminal
Run command updatedb if it’s doesnt work add in command-line
to the .bashrc in your user Folder.
Run locate in your commandline on mac
$ locate filename