locate is a Command Line Interfacetool to search for files in a pre-built database of files.
On Linux, you must update this database using:
sudo updatedb
On MacOS, it is not enabled by default:
$ locate <file_name>
WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist
Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.
Similar tools: find