2025-03-14 21:59:59 -06:00
|
|
|
# locate
|
|
|
|
|
|
|
|
|
|
> Find filenames quickly.
|
|
|
|
|
> More information: <https://manned.org/locate>.
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
- Look for pattern in the database. Note: The database is recomputed periodically (usually weekly or daily):
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`locate "{{pattern}}"`
|
|
|
|
|
|
|
|
|
|
- Look for a pattern case-insensitively:
|
|
|
|
|
|
|
|
|
|
`locate {{[-i|--ignore-case]}} "{{pattern}}"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Look for a file by its exact filename (a pattern containing no globbing characters is interpreted as `*pattern*`):
|
|
|
|
|
|
2025-12-16 10:20:31 -07:00
|
|
|
`locate "*/{{filename}}"`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Recompute the database. You need to do it if you want to find recently added files:
|
|
|
|
|
|
|
|
|
|
`sudo updatedb`
|