LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mlocate

finds files by searching a pre-built database rather than scanning

TLDR

Find files by name
$ locate [pattern]
copy
Case-insensitive search
$ locate -i [pattern]
copy
Update database
$ sudo updatedb
copy
Show only existing files
$ locate -e [pattern]
copy
Limit results
$ locate -l [10] [pattern]
copy
Count matches
$ locate -c [pattern]
copy

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
copy

INSTALL

nix profile install nixpkgs#mlocate
copy

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.

SEE ALSO

updatedb(8), find(1), fd(1), plocate(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid