renamed from debian.control
[findutils.git] / locate / locate.1
blobdde9cc63e40989974f713d61d0c7394bba255b1e
1 .TH LOCATE 1L \" -*- nroff -*-
2 .SH NAME
3 locate \- list files in databases that match a pattern
4 .SH SYNOPSIS
5 .B locate
6 [\-d path] [\-\-database=path] [\-\-version] [\-\-help] pattern...
7 .SH DESCRIPTION
8 This manual page
9 documents the GNU version of
10 .BR locate .
11 For each given pattern,
12 .B locate
13 searches one or more databases of file names and displays the
14 file names that contain the pattern.  Patterns can contain shell-style
15 metacharacters: `*', `?', and `[]'.  The metacharacters do not treat
16 `/' or `.'  specially.  Therefore, a pattern `foo*bar' can match a
17 file name that contains `foo3/bar', and a pattern `*duck*' can match a
18 file name that contains `lake/.ducky'.  Patterns that contain
19 metacharacters should be quoted to protect them from expansion by the
20 shell.
22 If a pattern is a plain string \(em it contains no metacharacters \(em
23 .B locate
24 displays all file names in the database that contain that string
25 anywhere.  If a pattern does contain metacharacters,
26 .B locate
27 only displays file names that match the pattern exactly.  As a result,
28 patterns that contain metacharacters should usually begin with a `*',
29 and will most often end with one as well.  The exceptions are patterns
30 that are intended to explicitly match the beginning or end of a file
31 name.
33 The file name databases contain lists of files that were on the system
34 when the databases were last updated.  The system administrator can
35 choose the file name of the default database, the frequency with which
36 the databases are updated, and the directories for which they contain
37 entries; see \fBupdatedb\fP(1L).
38 .SH OPTIONS
39 .TP
40 .I "\-d \fIpath\fP, \-\-database=\fIpath\fP"
41 Instead of searching the default file name database, search the file
42 name databases in \fIpath\fP, which is a colon-separated list of
43 database file names.  You can also use the environment variable
44 .B LOCATE_PATH
45 to set the list of database files to search.
46 The option overrides the environment variable if both are used.
48 The file name database format changed starting with GNU
49 .B find
50 and
51 .B locate
52 version 4.0 to allow machines with diffent byte orderings to share
53 the databases.  This version of
54 .B locate
55 can automatically recognize and read databases produced for older
56 versions of GNU
57 .B locate
58 or Unix versions of
59 .B locate
61 .BR find .
62 .TP
63 .I "\-\-help"
64 Print a summary of the options to
65 .B locate
66 and exit.
67 .TP
68 .I "\-\-version"
69 Print the version number of
70 .B locate
71 and exit.
72 .SH ENVIRONMENT
73 .TP
74 .B LOCATE_PATH
75 Colon-separated list of databases to search.
76 .SH "SEE ALSO"
77 \fBfind\fP(1L), \fBlocatedb\fP(5L), \fBupdatedb\fP(1L), \fBxargs\fP(1L)
78 \fBFinding Files\fP (on-line in Info, or printed)