Next: Invoking xargs, Previous: Invoking locate, Up: Reference
updatedb
updatedb [option...]
updatedb
creates and updates the database of file names used by
locate
. updatedb
generates a list of files similar to
the output of find
and then uses utilities for optimizing the
database for performance. updatedb
is often run periodically
as a cron
job and configured with environment variables or
command options. Typically, operating systems have a shell script
that “exports” configurations for variable definitions and uses
another shell script that “sources” the configuration file into the
environment and then executes updatedb
in the environment.
updatedb
creates and updates the database of file names used by
locate
. updatedb
generates a list of files similar to
the output of find
and then uses utilities for optimizing the
database for performance. updatedb
is often run periodically
as a cron
job and configured with environment variables or
command options. Typically, operating systems have a shell script
that “exports” configurations for variable definitions and uses
another shell script that “sources” the configuration file into the
environment and then executes updatedb
in the environment.
--findoptions='
OPTION...'
find
.
The environment variable FINDOPTIONS
also sets this value.
Default is none.
--localpaths='
path...'
--netpaths='
path...'
NETPATHS
also sets this value.
Default is none.
--prunepaths='
path...'
PRUNEPATHS
also sets this
value. Default is /tmp /usr/tmp /var/tmp /afs. The paths are
used as regular expressions (with find ... -regex
, so you need
to specify these paths in the same way that find
will encounter
them. This means for example that the paths must not include trailing
slashes.
--prunefs='
path...'
PRUNEFS
also sets this value. Default
is nfs NFS proc.
--output=
dbfile--localuser=
usersu
.
Default is to search the non-network directories as the current user.
You can also use the environment variable LOCALUSER
to set this user.
--netuser=
usersu
. Default
user
is daemon
. You can also use the environment variable
NETUSER
to set this user.
--old-format
locate
database in the old format, for compatibility
with versions of locate
other than GNU locate
. Using
this option means that locate
will not be able to properly
handle non-ASCII characters in file names (that is, file names
containing characters which have the eighth bit set, such as many of
the characters from the ISO-8859-1 character set). See Database Formats, for a detailed description of the supported database
formats.
--dbformat=
FORMATFORMAT
. Supported
database formats include LOCATE02
(which is the default),
old
and slocate
. The old
format exists for
compatibility with implementations of locate
on other Unix
systems. The slocate
format exists for compatibility with
slocate
. See Database Formats, for a detailed description
of each format.
--help
--version
updatedb
and exit.