mirror of
https://https.git.savannah.gnu.org/git/findutils.git
synced 2026-01-26 07:37:52 +00:00
The `\(en` special character escape sequence is not universally portable. Indirect it through a string definition. * find/find.1: * locate/locate.1: * locate/locatedb.5: * locate/updatedb.1: * xargs/xargs.1: Do the above. Discussed at: https://lists.gnu.org/r/bug-findutils/2025-11/msg00094.html Copyright-paperwork-exempt: Yes
165 lines
4.9 KiB
Groff
165 lines
4.9 KiB
Groff
.TH UPDATEDB 1 2023-11-10 findutils \" -*- nroff -*-
|
|
.ie \n(.g \{\
|
|
. ds en \(en
|
|
.\}
|
|
.el \{\
|
|
. ds en \-
|
|
.\}
|
|
.SH NAME
|
|
updatedb \- update a file name database
|
|
.SH SYNOPSIS
|
|
.B updatedb
|
|
.RI [ options ]
|
|
.
|
|
.SH DESCRIPTION
|
|
This manual page
|
|
documents the GNU version of
|
|
.BR updatedb ,
|
|
which updates file name databases used by GNU
|
|
.BR 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 \fBlocate\fP
|
|
and \fBupdatedb\fP are configured and installed. The frequency with
|
|
which the databases are updated and the directories for which they
|
|
contain entries depend on how often \fBupdatedb\fP is run, and with
|
|
which arguments.
|
|
.P
|
|
In networked environments, it often makes sense to build a database at
|
|
the root of each filesystem, containing the entries for that filesystem.
|
|
.B updatedb
|
|
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 \fBlocate\fP searches using an
|
|
environment variable or command line option; see \fBlocate\fP(1).
|
|
Databases cannot be concatenated together.
|
|
.P
|
|
The
|
|
.B LOCATE02
|
|
database format was introduced in GNU findutils
|
|
version 4.0 in order to allow machines with different byte orderings
|
|
to share the databases. GNU
|
|
.B locate
|
|
can read both the old and
|
|
.B LOCATE02
|
|
database formats, though
|
|
support for the old pre-4.0 database format will be removed shortly.
|
|
.
|
|
.SH OPTIONS
|
|
.TP
|
|
.B \-\-findoptions='\fI\-option1 \-option2...\fP'
|
|
Global options to pass on to \fBfind\fP.
|
|
The environment variable \fBFINDOPTIONS\fP also sets this value.
|
|
Default is none.
|
|
.TP
|
|
.B \-\-localpaths='\fIpath1 path2...\fP'
|
|
Non-network directories to put in the database.
|
|
Default is /.
|
|
.TP
|
|
.B \-\-netpaths='\fIpath1 path2...\fP'
|
|
Network (NFS, AFS, RFS, etc.) directories to put in the database.
|
|
The environment variable \fBNETPATHS\fP also sets this value.
|
|
Default is none.
|
|
.TP
|
|
.B \-\-prunepaths='\fIpath1 path2...\fP'
|
|
Directories to not put in the database, which would otherwise be.
|
|
Remove any trailing slashes from the path names, otherwise
|
|
.B updatedb
|
|
won't recognise the paths you want to omit (because it uses them as
|
|
regular expression patterns).
|
|
The environment variable \fBPRUNEPATHS\fP also sets this value.
|
|
Default is /tmp /usr/tmp /var/tmp /afs.
|
|
.TP
|
|
.B \-\-prunefs='\fIpath...\fP'
|
|
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
|
|
ignored.
|
|
The environment variable
|
|
\fBPRUNEFS\fP also sets this value.
|
|
Default is \fInfs NFS proc\fP.
|
|
.TP
|
|
.B \-\-output=\fIdbfile\fP
|
|
The database file to build.
|
|
Default is system-dependent. In Debian GNU/Linux, the default
|
|
is /var/cache/locate/locatedb.
|
|
.TP
|
|
.B \-\-localuser=\fIuser\fP
|
|
The user to search non-network directories as, using \fBsu\fP(1).
|
|
Default is to search the non-network directories as the current user.
|
|
You can also use the environment variable \fBLOCALUSER\fP to set this user.
|
|
.TP
|
|
.B \-\-netuser=\fIuser\fP
|
|
The user to search network directories as, using \fBsu\fP(1).
|
|
Default is \fBdaemon\fP.
|
|
You can also use the environment variable \fBNETUSER\fP to set this user.
|
|
.TP
|
|
.B \-\-dbformat=F
|
|
Create the database in format F. The default format is called LOCATE02.
|
|
Alternatively the
|
|
.B slocate
|
|
format is also supported. When the
|
|
.B slocate
|
|
format is in use, the database produced is marked as having security
|
|
level 1. If you want to build a system-wide
|
|
.B slocate
|
|
database, you may want to run
|
|
.B updatedb
|
|
as root.
|
|
.TP
|
|
.B \-\-version
|
|
Print the version number of
|
|
.B updatedb
|
|
and exit.
|
|
.TP
|
|
.B "\-\-help"
|
|
Print a summary of the options to
|
|
.B updatedb
|
|
and exit.
|
|
.
|
|
.SH "BUGS"
|
|
The
|
|
.B updatedb
|
|
program correctly handles filenames containing newlines,
|
|
but only if the system's sort command has a working
|
|
.I \-z
|
|
option. If you suspect that
|
|
.B locate
|
|
may need to return filenames containing newlines, consider using its
|
|
.I \-\-null
|
|
option.
|
|
.
|
|
.SH "REPORTING BUGS"
|
|
GNU findutils online help: <https://www.gnu.org/software/findutils/#get-help>
|
|
.br
|
|
Report any translation bugs to <https://translationproject.org/team/>
|
|
.PP
|
|
Report any other issue via the form at the GNU Savannah bug tracker:
|
|
.RS
|
|
<https://savannah.gnu.org/bugs/?group=findutils>
|
|
.RE
|
|
General topics about the GNU findutils package are discussed at the
|
|
.I bug\-findutils
|
|
mailing list:
|
|
.RS
|
|
<https://lists.gnu.org/mailman/listinfo/bug-findutils>
|
|
.RE
|
|
.
|
|
.SH COPYRIGHT
|
|
Copyright \(co 1994\*(en2026 Free Software Foundation, Inc.
|
|
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
|
|
.br
|
|
This is free software: you are free to change and redistribute it.
|
|
There is NO WARRANTY, to the extent permitted by law.
|
|
.
|
|
.SH "SEE ALSO"
|
|
.BR find (1),
|
|
.BR locate (1),
|
|
.BR xargs (1),
|
|
.BR locatedb (5)
|
|
.PP
|
|
Full documentation <https://www.gnu.org/software/findutils/updatedb>
|
|
.br
|
|
or available locally via:
|
|
.B info updatedb
|