locate [options] patternArguments explained
- pattern is a filename fragment or glob.
- -i ignores case.
- -n limits the number of results.
Common examples
locate sshd_configSearches the locate database for matching paths.
locate -n 10 bashrcShows only the first ten matches.
| Field | Details |
|---|---|
| Command | locate |
| Category | Search and Filtering |
| Primary use | Finds files quickly from a filename database. |
| Syntax | locate [options] pattern |