Install Locate on MacOS with Homebrew
This article gives the steps to install linux commands find, updatedb, locate and xargs on MacOS using Homebrew. Tested on macOS Sierra.
brew install findutils
Use Instead of System Binaries
By default the commands can be accessed by prefacing the commands (find, updatedb, locate and xargs) with a g. Such as, gupdatedb. However you can add the path to the replacement binaries to your .bashrc, .bash_profile or whichever you have loading.
# HomeBrew Findutils PATH="/usr/local/opt/findutils/libexec/gnubin:$PATH"
Additionally, you can access their man pages with normal names if you add the "gnuman" directory to your MANPATH from your bashrc as well: