Contents
How does updatedb update the file name database?
This manual page documents the GNU version of updatedb, which updates file name databases used by GNU locate. The file name databases contain lists of files that were in particular directory trees when the databases were last updated. The file name of the default database is determined when locate and updatedb are configured and installed.
When to use updatedb in locate ( 1 )?
updatedb creates or updates a database used by locate(1). If the database already exists, its data is reused to avoid rereading directories that have not changed. updatedb is usually run daily by cron(8) to update the default database.
Where does updatedb run in a network environment?
In networked environments, it often makes sense to build a database at the root of each filesystem, containing the entries for that filesystem. updatedb is then run for each filesystem on the fileserver where that filesystem is on a local disk, to prevent thrashing the network.
How often is updatedb run in Cron ( 8 )?
updatedb is usually run daily by cron(8) to update the default database.
How is the default database file name determined?
The file name of the default database is determined when locate and updatedb are configured and installed. The frequency with which the databases are updated and the directories for which they contain entries depend on how often updatedb is run, and with which arguments.
Is there a command line version of updatedb?
There are two popular implementations of updatedb. One of them is from GNU findutils. Another is mlocate. They support different command line options and configuration files, especially for the updatedb program. It appears that the updatedb command on your system is the one from mlocate but the man page is the one from findutils.
When to use null option in updatedb program?
The updatedb program correctly handles filenames containing newlines, but only if the system’s sort command has a working -z option. If you suspect that locate may need to return filenames containing newlines, consider using its –null option.