1updatedb(8) System Manager's Manual updatedb(8)
2
3
4
6 updatedb - update a database for mlocate
7
8
10 updatedb [OPTION]...
11
12
14 updatedb creates or updates a database used by locate(1). If the data‐
15 base already exists, its data is reused to avoid rereading directories
16 that have not changed.
17
18 updatedb is usually run daily by cron(8) to update the default data‐
19 base.
20
21
23 updatedb returns with exit status 0 on success, 1 on error.
24
25
27 The PRUNE_BIND_MOUNTS, PRUNEFS, PRUNENAMES and PRUNEPATHS variables,
28 which are modified by some of the options, are documented in detail in
29 updatedb.conf(5).
30
31
32 -f, --add-prunefs FS
33 Add entries in white-space-separated list FS to PRUNEFS.
34
35
36 -n, --add-prunenames NAMES
37 Add entries in white-space-separated list NAMES to PRUNENAMES.
38
39
40 -e, --add-prunepaths PATHS
41 Add entries in white-space-separated list PATHS to PRUNEPATHS.
42
43
44 -U, --database-root PATH
45 Store only results of scanning the file system subtree rooted at
46 PATH to the generated database. The whole file system is
47 scanned by default.
48
49 locate(1) outputs entries as absolute path names which don't
50 contain symbolic links, regardless of the form of PATH.
51
52
53 --debug-pruning
54 Write debugging information about pruning decisions to standard
55 error output.
56
57
58 -h, --help
59 Write a summary of the available options to standard output and
60 exit successfully.
61
62
63 -o, --output FILE
64 Write the database to FILE instead of using the default data‐
65 base.
66
67
68 --prune-bind-mounts FLAG
69 Set PRUNE_BIND_MOUNTS to FLAG, overriding the configuration
70 file.
71
72
73 --prunefs FS
74 Set PRUNEFS to FS, overriding the configuration file.
75
76
77 --prunenames NAMES
78 Set PRUNENAMES to NAMES, overriding the configuration file.
79
80
81 --prunepaths PATHS
82 Set PRUNEPATHS to PATHS, overriding the configuration file.
83
84
85 -l, --require-visibility FLAG
86 Set the “require file visibility before reporting it” flag in
87 the generated database to FLAG.
88
89 If FLAG is 0 or no, or if the database file is readable by "oth‐
90 ers" or it is not owned by slocate, locate(1) outputs the data‐
91 base entries even if the user running locate(1) could not have
92 read the directory necessary to find out the file described by
93 the database entry.
94
95 If FLAG is 1 or yes (the default), locate(1) checks the permis‐
96 sions of parent directories of each entry before reporting it to
97 the invoking user. To make the file existence truly hidden from
98 other users, the database group is set to slocate and the data‐
99 base permissions prohibit reading the database by users using
100 other means than locate(1), which is set-gid slocate.
101
102 Note that the visibility flag is checked only if the database is
103 owned by slocate and it is not readable by "others".
104
105
106 -v, --verbose
107 Output path names of files to standard output, as soon as they
108 are found.
109
110
111 -V, --version
112 Write information about the version and license of locate on
113 standard output and exit successfully.
114
115
117 To create a private mlocate database as an user other than root, run
118 updatedb -l 0 -o db_file -U source_directory
119 Note that all users that can read db_file can get the complete list of
120 files in the subtree of source_directory.
121
122
124 /etc/updatedb.conf
125 A configuration file. See updatedb.conf(5).
126
127
128 /var/lib/mlocate/mlocate.db
129 The database updated by default.
130
131
133 Databases built with --require-visibility no allow users to find names
134 of files and directories of other users, which they would not otherwise
135 be able to do.
136
137
139 The accompanying locate(1) utility was designed to be compatible to
140 slocate and attempts to be compatible to GNU locate where possible.
141 This is not the case for updatedb.
142
143
145 Miloslav Trmac <mitr@redhat.com>
146
147
149 locate(1), mlocate.db(5), updatedb.conf(5)
150
151
152
153mlocate Jun 2008 updatedb(8)