1 .TH UPDATEDB 1 \" -*- nroff -*-
3 updatedb \- update a file name database
5 .B updatedb [\fIoptions\fP]
9 documents the GNU version of
11 which updates file name databases used by GNU
13 The file name databases contain lists of files that were in
14 particular directory trees when the databases were last updated.
15 The file name of the default database is determined when \fBlocate\fP
16 and \fBupdatedb\fP are configured and installed. The frequency with
17 which the databases are updated and the directories for which they
18 contain entries depend on how often \fBupdatedb\fP is run, and with
21 In networked environments, it often makes sense to build a database at
22 the root of each filesystem, containing the entries for that filesystem.
24 is then run for each filesystem on the fileserver where that
25 filesystem is on a local disk, to prevent thrashing the network.
26 Users can select which databases \fBlocate\fP searches using an
27 environment variable or command line option; see \fBlocate\fP(1).
28 Databases cannot be concatenated together.
32 database format was introduced in GNU findutils
33 version 4.0 in order to allow machines with different byte orderings
34 to share the databases. GNU
36 can read both the old and
38 database formats, though
39 support for the old pre-4.0 database format will be removed shortly.
43 .B \-\-findoptions='\fI\-option1 \-option2...\fP'
44 Global options to pass on to \fBfind\fP.
45 The environment variable \fBFINDOPTIONS\fP also sets this value.
48 .B \-\-localpaths='\fIpath1 path2...\fP'
49 Non-network directories to put in the database.
52 .B \-\-netpaths='\fIpath1 path2...\fP'
53 Network (NFS, AFS, RFS, etc.) directories to put in the database.
54 The environment variable \fBNETPATHS\fP also sets this value.
57 .B \-\-prunepaths='\fIpath1 path2...\fP'
58 Directories to not put in the database, which would otherwise be.
59 Remove any trailing slashes from the path names, otherwise
61 won't recognise the paths you want to omit (because it uses them as
62 regular expression patterns).
63 The environment variable \fBPRUNEPATHS\fP also sets this value.
64 Default is /tmp /usr/tmp /var/tmp /afs.
66 .B \-\-prunefs='\fIpath...\fP'
67 File systems to not put in the database, which would otherwise be.
68 Note that files are pruned when a file system is reached;
69 any file system mounted under an undesired file system will be
71 The environment variable
72 \fBPRUNEFS\fP also sets this value.
73 Default is \fInfs NFS proc\fP.
75 .B \-\-output=\fIdbfile\fP
76 The database file to build.
77 Default is system-dependent. In Debian GNU/Linux, the default
78 is /var/cache/locate/locatedb.
80 .B \-\-localuser=\fIuser\fP
81 The user to search non-network directories as, using \fBsu\fP(1).
82 Default is to search the non-network directories as the current user.
83 You can also use the environment variable \fBLOCALUSER\fP to set this user.
85 .B \-\-netuser=\fIuser\fP
86 The user to search network directories as, using \fBsu\fP(1).
87 Default is \fBdaemon\fP.
88 You can also use the environment variable \fBNETUSER\fP to set this user.
91 Create the database in format F. The default format is called LOCATE02.
94 format is also supported. When the
96 format is in use, the database produced is marked as having security
97 level 1. If you want to build a system-wide
99 database, you may want to run
104 Print the version number of
109 Print a summary of the options to
116 program correctly handles filenames containing newlines,
117 but only if the system's sort command has a working
119 option. If you suspect that
121 may need to return filenames containing newlines, consider using its
126 GNU findutils online help: <https://www.gnu.org/software/findutils/#get-help>
128 Report any translation bugs to <https://translationproject.org/team/>
130 Report any other issue via the form at the GNU Savannah bug tracker:
132 <https://savannah.gnu.org/bugs/?group=findutils>
134 General topics about the GNU findutils package are discussed at the
138 <https://lists.gnu.org/mailman/listinfo/bug-findutils>
142 Copyright \(co 1994-2022 Free Software Foundation, Inc.
143 License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
145 This is free software: you are free to change and redistribute it.
146 There is NO WARRANTY, to the extent permitted by law.
154 Full documentation <https://www.gnu.org/software/findutils/updatedb>
156 or available locally via: