Mac OS X locate Command Quick-Start
This is short Mac Tutorial Get You Started on Mac OS X El Capitan 10.11 with a Very Useful Shell Utility: the locate Command.
Almost all we are working on Mac before or after we need desperately to Find something from the Shell.
The Easiest and Fastest Way to Find System’s Entities in Unix-like Platforms is Matched Using the “locate” Shell Command.

-
Open a Command Line Terminal Window
Applications > Utilities > Terminal
(Press “Enter” to Execute Commands) -
Make a Command Alias to Update the locate Database
nano $HOME/.profile
Append:
alias updatedb="sudo /usr/libexec/locate.updatedb"
Ctrl+x to Save changes & Exit
-
Update the Locate Database:
updatedb
You’ll be Propted to Insert the root User Password
You need to Wait for a little while Until the Locate Database is Updated…
This is procedure Should be Repeated Every Time you Use the locate Command and your System made some Significant Change.p>How-to Automatically Update the locate Database with Cron
-
Simple Keyword Searching
locate [myKeyword]
Whith the Syntax above you can Locate All Files, Directories, Images and Locations Containing the Given “myKeyword”
-
How-to Refine your locate Search-Results
How-to Use grep with locate