LinuxCommandLibrary

updatedb

Build filename database for locate searches

TLDR

Refresh database

$ sudo updatedb
copy
Verbose mode
$ sudo updatedb -v
copy

SYNOPSIS

updatedb [OPTIONS]

DESCRIPTION

updatedb creates or updates the database used by the locate command. It scans the filesystem and builds an index of all filenames for fast searching.
The command is usually run daily by cron to keep the database current. Manual execution is needed to index newly created files before the next scheduled update.

PARAMETERS

-v, --verbose

Display filenames as they are found
--prunepaths PATHS
Exclude specified paths from database
--prunefs TYPES
Exclude specified filesystem types
-o, --output FILE
Write to specified database file

CONFIGURATION

/etc/updatedb.conf

Controls which paths, filesystem types, and file patterns are included or excluded from the database.

CAVEATS

Requires root privileges for full filesystem access. Initial scan can take several minutes on large filesystems. Network filesystems are typically excluded by default.

SEE ALSO

locate(1), mlocate(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community