How to enable locate on Mac OS X
In this tutorial, I will show you how to enable locate on Mac OS X. So, let’s get started.
The locate command is often the simplest and quickest way to find the locations of files and directories on Linux and other Unix-like operating systems.
The basic syntax for locate is:
locate [options] name(s)
When used without any options, locate displays every absolute pathname for which the user has access permission that contains any of the names of files and/or directories that are provided to it as arguments (i.e., input data).
Read Also: How to install postgres 9.6 on Mac OS
To enable the locate on Mac OS X just execute the following command:
It would take few minutes to update the database or it will build the database if you didn’t have on before.
If you want to just execute the updatedb command instead of long command we can make a link. It will be easy to execute the updatedb command. Use the following command to make a link.
sudo ln -s /usr/libexec/locate.updatedb /usr/local/bin/updatedb
Now you can just execute the command
updatedb and update the database.
Read Also: Install pghero on mac