This utility performs a search through a previously created database of files and directories available on our system. It matches all entries that contain a specified character string. This sometimes returns a very long list of matching results, which can be further filtered using the grep command, as shown in the following command line:
$ locate zip | grep bin
$ locate iproute2
The locate command uses a database created by another program, updatedb. Most Linux systems run this program automatically once a day using a scheduler. However, we can update the locate command database any time by running the updatedb command on a Terminal.