mlocate
finds files by searching a pre-built database rather than scanning
TLDR
Find files by name
$ locate [pattern]
Case-insensitive search$ locate -i [pattern]
Update database$ sudo updatedb
Show only existing files$ locate -e [pattern]
Limit results$ locate -l [10] [pattern]
Count matches$ locate -c [pattern]
SYNOPSIS
locate [options] pattern...
DESCRIPTION
mlocate (merging locate) finds files by searching a pre-built database rather than scanning the filesystem. This makes searches extremely fast.
The database is typically updated daily by cron, or manually with updatedb.
PARAMETERS
-i, --ignore-case
Case-insensitive match.-l n, --limit n
Limit output to n entries.-c, --count
Print count only.-e, --existing
Only existing files.-b, --basename
Match basename only.-r, --regexp
Use regex pattern.-d path
Use specific database.
DATABASE
$ Default: /var/lib/mlocate/mlocate.db
Config: /etc/updatedb.conf
# Update database
sudo updatedb
Config: /etc/updatedb.conf
# Update database
sudo updatedb
CAVEATS
Database may be outdated. New files won't appear until updatedb runs. Some paths excluded by default. Requires updatedb for fresh results.
HISTORY
mlocate was created by Miloslav Trmač as an improvement over GNU locate, using a more efficient database format that tracks file changes.
