Linux and Unix locate command
List files in databases that match a pattern.
locate [-d path | --database=path] [-e | --existing] [-i | --ignore-case ] [--version] [--help] pattern...
|Instead of searching the default file name database, search the file name databases in path, which is a colon-separated list of database
file names. You can also use the environment variable LOCATE_PATH to set the list of database files to search. The option overrides the environment
variable if both are used.
The file name database format changed starting with GNU find and locate version 4.0 to allow machines with different byte orderings to share the databases. This version of locate can automatically recognize and read databases produced for older versions of GNU locate or Unix versions of locate or find.
|Only print out such names that currently exist (instead of such names that existed when the database was created). Note that this may slow down the program a lot, if there are many matches in the database.|
|Ignore case distinctions in both the pattern and the file names.|
|--help||Print a summary of the options to locate and exit.|
|--version||Print the version number of locate and exit.|
In the above example the system would locate Perl on the local machine.
Note: You may need to run the "updatedb" command to update the database in order to find the file you are searching for. This command should be ran anytime *nix is first installed or a major update occurs.