locate
FilesFundamentals In simulator In real LinuxFind files by name using a prebuilt index
Name: locate
You can practise it right away in the simulator, and use it in real Linux mode too.
Description
locate searches a prebuilt database of file names, so results come back almost instantly. The database is usually refreshed daily, so new files may be missing until you run sudo updatedb.
On modern distributions it comes from the mlocate or plocate package.
Syntax
locate [OPTION]... PATTERN...Common options
| -i / --ignore-case | Ignore case |
| -c / --count | Only print the number of matches |
| -l / --limit N | Show at most N results |
| -b / --basename | Match only the last part of the path |
| -e / --existing | Show only files that still exist (the database may be old) |
| -r / --regex REGEX | Match a regular expression |