.TH UPDATEDB 1 \" -*- nroff -*- .SH NAME updatedb \- update a file name database .SH SYNOPSIS .B updatedb [\fIoptions\fP] .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 can not be concatenated together. .P Versions of locate prior to 4.2.31 fail to correctly handle long file names in the old databse format, but the default database format (called LOCATE02) is not affected by this problem. All versions of .B locate since version 4.0 support the new LOCATE02 format. The old database format also cannot correctly represent non-ASCII characters. .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 \-\-old\-format Create the database in the old format instead of the new one. Avoid using this option as older versions of locate are susceptible to a buffer overrun when reading old-format databases. The old fatabase format is also incapable of correctly representing non-ASCII characters. .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 "SEE ALSO" \fBfind\fP(1), \fBlocate\fP(1), \fBlocatedb\fP(5), \fBxargs\fP(1) \fBFinding Files\fP (on-line in Info, or printed) .SH "BUGS" .P All versions of GNU locate prior to 4.2.31 fail to correctly handle long (roughly, over 1024 bytes) filenames in old-format databases. This can lead to a heap buffer overrun and it a potential security issue. Verions 4.3.0 to 4.3.6 are also affected by the bug. Databases in the default LOCATE02 format are correctly handled. .P 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. .P The best way to report a bug is to use the form at http://savannah.gnu.org/bugs/?group=findutils. The reason for this is that you will then be able to track progress in fixing the problem. Other comments about \fBupdatedb\fP(1) and about the findutils package in general can be sent to the .I bug-findutils mailing list. To join the list, send email to .IR bug-findutils-request@gnu.org .