Man page of UPDATEDB
Section: User Commands (1)
Return to Main Contents
updatedb - update a file name database
This manual page
documents the GNU version of
which updates file name databases used by GNU
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. 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
In networked environments, it often makes sense to build a database at
the root of each filesystem, containing the entries for that filesystem.
is then run for each filesystem on the fileserver where that
filesystem is on a local disk, to prevent thrashing the network.
Users can select which databases locate searches using an
environment variable or command line option; see locate(1).
Databases can not be concatenated together.
The file name database format changed starting with GNU
version 4.0 to allow machines with different byte orderings to share
the databases. The new GNU
can read both the old and new database formats.
However, old versions of
produce incorrect results if given a new-format database.
- --findoptions='-option1 -option2...'
Global options to pass on to find.
The environment variable FINDOPTIONS also sets this value.
Default is none.
- --localpaths='path1 path2...'
Non-network directories to put in the database.
Default is /.
- --netpaths='path1 path2...'
Network (NFS, AFS, RFS, etc.) directories to put in the database.
The environment variable NETPATHS also sets this value.
Default is none.
- --prunepaths='path1 path2...'
Directories to not put in the database, which would otherwise be.
Remove any trailing slashes from the path names, otherwise
won't recognise the paths you want to omit (because it uses them as
regular expression patterns).
The environment variable PRUNEPATHS also sets this value.
Default is /tmp /usr/tmp /var/tmp /afs.
File systems to not put in the database, which would otherwise be.
Note that files are pruned when a file system is reached;
any file system mounted under an undesired file system will be
The environment variable
PRUNEFS also sets this value.
Default is nfs NFS proc.
The database file to build.
Default is system-dependent. In Debian GNU/Linux, the default
The user to search non-network directories as, using su(1).
Default is to search the non-network directories as the current user.
You can also use the environment variable LOCALUSER to set this user.
The user to search network directories as, using su(1).
Default is daemon.
You can also use the environment variable NETUSER to set this user.
Create the database in the old format. This is a synonym for
Create the database in format F. The default format is called LOCATE02.
F can be
to select the old database format (this is the same as specifying
format is also supported. When the
format is in use, the database produced is marked as having security
level 1. If you want to build a system-wide
database, you may want to run
Print the version number of
Print a summary of the options to
find(1), locate(1), locatedb(5), xargs(1)
Finding Files (on-line in Info, or printed)
program correctly handles filenames containing newlines,
but only if the system's sort command has a working
option. If you suspect that
may need to return filenames containing newlines, consider using its
The best way to report a bug is to use the form at
The reason for this is that you will then be able to track progress in
fixing the problem. Other comments about updatedb(1) and about
the findutils package in general can be sent to the
mailing list. To join the list, send email to
- SEE ALSO
This document was created by
using the manual pages.
Time: 03:41:18 GMT, September 24, 2010