xref: /netbsd-src/share/man/man5/locate.conf.5 (revision 3fd4d3b537ed5ebcaf4a16cd8eb8bfaf6e791f03)
1.\"	$NetBSD: locate.conf.5,v 1.12 2020/04/26 00:40:10 simonb Exp $
2.\"
3.\" Copyright (c) 2004 The NetBSD Foundation, Inc.
4.\" All rights reserved.
5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by ITOH Yasufumi.
8.\"
9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions
11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright
13.\"    notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\"    notice, this list of conditions and the following disclaimer in the
16.\"    documentation and/or other materials provided with the distribution.
17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd April 25, 2020
31.Dt LOCATE.CONF 5
32.Os
33.Sh NAME
34.Nm locate.conf
35.Nd locate database configuration file
36.Sh DESCRIPTION
37The
38.Nm locate.conf
39file specifies the behavior of
40.Xr locate.updatedb 8 ,
41which creates the
42.Xr locate 1
43database.
44.Pp
45The
46.Nm
47file contains a list of newline separated records,
48each of which is composed of a keyword and arguments,
49which are separated by white space.
50Arguments with embedded shell metacharacters must be quoted in
51.Xr sh 1
52style.
53Lines beginning with
54.Dq #
55are treated as comments and ignored.
56However, a
57.Dq #
58in the middle of a line does not start a comment.
59.Pp
60The configuration options are as follows:
61.Bl -tag -width XXXXXX
62.It Sy database Ar filename
63Specify the location of the
64.Xr locate 1
65database to be created.
66.Pp
67Default:
68.Pa /var/db/locate.database
69.It Sy ignore Ar pattern ...
70Ignore files or directories.
71When building the database,
72do not descend into files or directories
73which match one of the specified patterns.
74The matched files or directories are not stored to the database.
75.Pp
76Default: Not specified.
77.It Sy ignorecontents Ar pattern ...
78Ignore contents of directories.
79When building the database,
80do not descend into files or directories
81which match one of the specified patterns.
82The matched files or directories themselves are stored to the database.
83.Pp
84Default: Not specified.
85.It Sy ignorefs Ar type ...
86Ignore file system by type,
87adding
88.Ar type
89to the default list.
90When building the database,
91do not descend into file systems which are of the specified
92.Ar type .
93The mount points are not stored to the database.
94If a
95.Dq \&!
96is prepended to
97.Ar type ,
98the meaning is negated,
99that is, ignore file systems which do not have the type.
100As a special case, if
101.Dq none
102is specified for
103.Ar type ,
104the
105.Sy ignorefs
106list is cleared and all file systems are traversed.
107.Pp
108.Ar type
109is used as an argument to
110.Xr find 1
111.Fl fstype .
112The
113.Xr sysctl 8
114command can be used to find out the types of file systems
115that are available on the system:
116.Bd -literal -offset indent
117sysctl vfs.generic.fstypes
118.Ed
119.Pp
120Default: !local cd9660 fdesc kernfs procfs
121.It Sy searchpath Ar directory ...
122Specify base directories to be put in the database.
123.Pp
124Default:
125.Pa /
126.It Sy workdir Ar directory
127Specify the working directory of locate.updatedb,
128in which a temporary file is placed.
129The temporary file is a list of all files,
130and you should specify a directory that has enough space to hold it.
131.Pp
132Default:
133.Pa /tmp
134.El
135.Pp
136Refer to
137.Xr find 1
138for the details of
139.Ar pattern
140(see
141.Fl path
142expression)
143and
144.Ar type
145(see
146.Fl fstype
147expression).
148.Sh FILES
149.Bl -tag -width /usr/libexec/locate.updatedb -compact
150.It Pa /etc/locate.conf
151The file
152.Nm
153resides in
154.Pa /etc .
155.El
156.Sh SEE ALSO
157.Xr find 1 ,
158.Xr locate 1 ,
159.Xr locate.updatedb 8 ,
160.Xr sysctl 8
161.Sh HISTORY
162The
163.Nm
164file format first appeared in
165.Nx 2.0 .
166.Sh AUTHORS
167.An ITOH Yasufumi
168