summaryrefslogtreecommitdiff
path: root/locate/updatedb.1
blob: 905fcfed0cddbaaea49c77a157bda6f1426ee416 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
.TH UPDATEDB 1L \" -*- 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(1L).
Databases can not be concatenated together.
.P
The file name database format changed starting with GNU
.B find
and
.B locate
version 4.0 to allow machines with diffent byte orderings to share
the databases.  The new GNU
.B locate
can read both the old and new database formats.
However, old versions of
.B locate
and
.B find
produce incorrect results if given a new-format database.
.SH OPTIONS
.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.
Default is none.
.TP
.B \-\-prunepaths='\fIpath1 path2...\fP'
Directories to not put in the database, which would otherwise be.
Default is /tmp /usr/tmp /var/tmp /afs.
.TP
.B \-\-output=\fIdbfile\fP
The database file to build.
Default is system-dependent.  In Debian GNU/Linux, the default
is /var/lib/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.
.TP
.B \-\-version
Print the version number of
.B updatedb
and exit.
.TP
.I "\-\-help"
Print a summary of the options to
.B updatedb
and exit.
.SH "SEE ALSO"
\fBfind\fP(1L), \fBlocate\fP(1L), \fBlocatedb\fP(5L), \fBxargs\fP(1L)
\fBFinding Files\fP (on-line in Info, or printed)