1 .TH locate 1 "Oct 2020" plocate
3 plocate \- find files by name, quickly
12 finds all files on the system matching the given pattern (or all
13 of the patterns if multiple are given). It does this by means of
15 .BR plocate-build (8),
16 which in turn reads the database made by
19 plocate is largely compatible with
21 and reuses its database to create its index, but is significantly
22 faster. In particular, it rarely needs to scan through its entire
23 database, unless the pattern is very short (less than three bytes)
24 or you want to search for a regular expression. It does not try to
25 maintain compatibility with BSD locate, or non-UTF-8 filenames
26 and locales. Most I/O is done asynchronously, but the results are
27 synchronized so that output comes in the same order every time.
29 When multiple patterns are given,
31 will search for files that match
33 of them. This is the main incompatibility with
35 which searches for files that match one or more patterns, unless
36 the \-a option is given.
38 By default, patterns are taken to be substrings to search for.
39 If at least one non-escaped globbing metacharacter (*, ? or []) is given,
40 that pattern is instead taken to be a glob pattern (which means it needs
41 to start and end in * for a substring match). If
43 is given, patterns are instead taken to be (non-anchored) POSIX basic
44 regular expressions, and if
46 is given, patterns are taken to be POSIX extended regular expressions.
54 shows all files visible to the calling user (by virtue of
55 having read and execute permissions on all parent directories),
56 and none that are not, by means of running with the setgid
57 bit set to access the index (which is built as root), but by
58 testing visibility as the calling user.
62 \fB\-b\fR, \fB\-\-basename\fR
63 Match only against the file name portion of the path name,
64 ie., the directory names will be excluded from the match
65 (but still printed). This does not speed up the search,
66 but can suppress uninteresting matches.
69 \fB\-c\fR, \fB\-\-count\fR
70 Do not print each match. Instead, count them, and print out a total
74 \fB\-d\fR, \fB\-\-database\fR \fIDBPATH\fR
75 Find matches in \fB/var/lib/mlocate/plocate.db\fR, instead of the given database.
78 does not currently support multiple databases.)
81 \fB\-i\fR, \fB\-\-ignore\-case\fR
82 Do a case-insensitive match as given by the current locale
83 (default is case-sensitive, byte-by-byte match). Note that
85 does not support the full range of Unicode case folding rules;
86 in particular, searching for \fIß\fR will not give you matches on \fIss\fR
87 even in a German locale. Also note that this option will be
88 somewhat slower than a case-sensitive match, since it needs to
89 generate more candidates for searching the index.
92 \fB\-l\fR, \fB\-\-limit\fR \fILIMIT\fR
95 matches have been found. If
97 is given, the number printed out will be at most \fILIMIT\fR.
100 \fB\-0\fR, \fB\-\-null\fR
101 Instead of writing a newline after every match, write a NUL
102 (ASCII 0). This is useful for creating unambiguous output
103 when it is to be processed by other tools (like \fBxargs\fP(1)), as filenames are
104 allowed to contain embedded newlines.
107 \fB\-r\fR, \fB\-\-regexp\fR
108 Patterns are taken to be POSIX basic regular expressions.
111 for more information. Note that this forces a linear scan
112 through the entire database, which is slow.
116 Like \fB\-\-regexp\fR, but patterns are instead taken to
122 \fB\-w\fR, \fB\-\-wholename\fR
123 Match against the entire path name. This is the default,
124 so unless \fB-b\fR is given first (see above), it will not do
125 anything. This option thus exists only as compatibility with
130 Print out usage information, then exit successfully.
134 Print out version information, then exit successfully.
137 Steinar H. Gunderson <steinar+plocate@gunderson.no>
140 \fBplocate-build\fP(8),