locate is a search tool for the command-line aswell 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
export PATH="/usr/local/bin:$PATH"
to the .bashrc in your user Folder.
Run locate in your command-line on mac
$ locate filename