]> git.sesse.net Git - plocate/blob - updatedb.8.in
Release plocate 1.1.22.
[plocate] / updatedb.8.in
1 .\" A man page for updatedb(8). -*- nroff -*-
2 .\"
3 .\" Copyright (C) 2005, 2007, 2008 Red Hat, Inc. All rights reserved.
4 .\"
5 .\" This copyrighted material is made available to anyone wishing to use,
6 .\" modify, copy, or redistribute it subject to the terms and conditions of the
7 .\" GNU General Public License v.2.
8 .\"
9 .\" This program is distributed in the hope that it will be useful, but WITHOUT
10 .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 .\" more details.
13 .\"
14 .\" You should have received a copy of the GNU General Public License along
15 .\" with this program; if not, write to the Free Software Foundation, Inc.,
16 .\" 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 .\"
18 .\" Author: Miloslav Trmac <mitr@redhat.com>
19 .TH updatedb 8 "Dec 2020" plocate
20
21 .SH NAME
22 updatedb \- update a database for plocate
23
24 .SH SYNOPSIS
25
26 \fBupdatedb\fR [\fIOPTION\fR]...
27
28 .SH DESCRIPTION
29 .B updatedb
30 creates or updates a database used by
31 .BR locate (1).
32 If the database already exists,
33 its data is reused
34 to avoid rereading directories that have not changed.
35
36 .B updatedb
37 is usually run daily from a
38 .BR systemd.timer (8)
39 to update the default database.
40
41 .SH EXIT STATUS
42 .B updatedb
43 returns with exit status 0 on success, 1 on error.
44
45 .SH OPTIONS
46 The \fBPRUNE_BIND_MOUNTS\fR, \fBPRUNEFS\fR,
47 .B PRUNENAMES
48 and
49 .B PRUNEPATHS
50 variables, which are modified by some of the options, are documented in detail
51 in
52 .BR updatedb.conf (5).
53
54 .TP
55 \fB\-f\fR, \fB\-\-add-prunefs\fB \fIFS\fR
56 Add entries in white-space-separated list \fIFS\fR to \fBPRUNEFS\fR.
57
58 .TP
59 \fB\-n\fR, \fB\-\-add-prunenames\fB \fINAMES\fR
60 Add entries in white-space-separated list \fINAMES\fR to \fBPRUNENAMES\fR.
61
62 .TP
63 \fB\-e\fR, \fB\-\-add-prunepaths\fB \fIPATHS\fR
64 Add entries in white-space-separated list \fIPATHS\fR to \fBPRUNEPATHS\fR.
65
66 .TP
67 \fB\-U\fR, \fB\-\-database\-root\fR \fIPATH\fR
68 Store only results of scanning the file system subtree rooted at \fIPATH\fR to
69 the generated database.
70 The whole file system is scanned by default.
71
72 .BR locate (1)
73 outputs entries as absolute path names which don't contain symbolic links,
74 regardless of the form of \fIPATH\fR.
75
76 .TP
77 \fB\-\-debug\-pruning\fR
78 Write debugging information about pruning decisions to standard error output.
79
80 .TP
81 \fB\-h\fR, \fB\-\-help\fR
82 Write a summary of the available options to standard output
83 and exit successfully.
84
85 .TP
86 \fB\-o\fR, \fB\-\-output\fR \fIFILE\fR
87 Write the database to
88 .I FILE
89 instead of using the default database.
90
91 .TP
92 \fB\-\-prune\-bind\-mounts\fR \fIFLAG\fR
93 Set
94 .B PRUNE_BIND_MOUNTS
95 to \fIFLAG\fR, overriding the configuration file.
96
97 .TP
98 \fB\-\-prunefs\fR \fIFS\fR
99 Set \fBPRUNEFS\fR to \fIFS\fR, overriding the configuration file.
100
101 .TP
102 \fB\-\-prunenames\fR \fINAMES\fR
103 Set \fBPRUNENAMES\fR to \fINAMES\fR, overriding the configuration file.
104
105 .TP
106 \fB\-\-prunepaths\fR \fIPATHS\fR
107 Set \fBPRUNEPATHS\fR to \fIPATHS\fR, overriding the configuration file.
108
109 .TP
110 \fB\-l\fR, \fB\-\-require\-visibility\fR \fIFLAG\fR
111 Set the \*(lqrequire file visibility before reporting it\*(rq flag in the
112 generated database to \fIFLAG\fR.
113
114 If
115 .I FLAG
116 is
117 .B 0
118 or \fBno\fR,
119 or if the database file is readable by "others"
120 or it is not owned by \fB@groupname@\fR,
121 .BR locate (1)
122 outputs the database entries even if the user running
123 .BR locate (1)
124 could not have read the directory necessary to find out the file described
125 by the database entry.
126
127 If
128 .I FLAG
129 is
130 .B 1
131 or
132 .B yes
133 (the default),
134 .BR locate (1)
135 checks the permissions of parent directories of each entry
136 before reporting it to the invoking user.
137 To make the file existence truly hidden from other users, the database
138 group is set to
139 .B @groupname@
140 and the database permissions prohibit reading the database by users using
141 other means than
142 .BR locate (1),
143 which is set-gid \fB@groupname@\fR.
144
145 Note that the visibility flag is checked only if the database is owned by
146 .B @groupname@
147 and it is not readable by "others".
148
149 .TP
150 \fB\-v\fR, \fB\-\-verbose\fR
151 Output path names of files to standard output, as soon as they are found.
152
153 .TP
154 \fB\-V\fR, \fB\-\-version\fR
155 Write information about the version and license of
156 .B locate
157 on standard output and exit successfully.
158
159 .SH EXAMPLES
160 To create a private plocate database as a user other than \fBroot\fR,
161 run
162 .RS
163 .B updatedb -l 0 \-o
164 .I db_file
165 .B \-U
166 .I source_directory
167 .RE
168 Note that all users that can read
169 .I db_file
170 can get the complete list of files in the subtree of \fIsource_directory\fR.
171
172 .SH FILES
173 .TP
174 \fB@updatedb_conf@\fR
175 A configuration file.  See
176 .BR updatedb.conf (5).
177
178 .TP
179 \fB@dbfile@\fR
180 The database updated by default. Uses exactly the same format
181 as the one used by
182 .BR mlocate (1)'s
183 updatedb, so they can be shared.
184
185 .SH SECURITY
186 Databases built with
187 .B \-\-require\-visibility no
188 allow users to find names of files and directories of other users,
189 which they would not otherwise be able to do.
190
191 .SH AUTHOR
192 Miloslav Trmac <mitr@redhat.com>
193 .P
194 Steinar H. Gunderson <steinar+plocate@gunderson.no>
195
196 .SH SEE ALSO
197 .BR locate (1),
198 .BR updatedb.conf (5)