Linux locate command is used to find eligible documents or directories in the database.
When locate is first executed, it establishes an index database, and when it is executed again later, it quickly locates files from the index database.
Locate is well suited for iteratively searching for directory trees that rarely change, but for renamed old files and newly created files, can't be found unless the database is rebuilt.
Locate is different from Find:
Find is to find the hard disk, Locate is only found in the database.
➜ ~ locate php
# More Info
➜ ~ man locate
➜ ~ find path expression [action]
Using Path as the starting point of the search, each document that meets the expression criteria is found layer by layer, and the action represented by the action is executed on the file.