1 .TH LOCATE 1L \" -*- nroff -*-
3 locate \- list files in databases that match a pattern
6 [\-d path | \-\-database=path] [-e | --existing] [-i | --ignore-case ]
7 [\-\-version] [\-\-help] pattern...
10 documents the GNU version of
12 For each given pattern,
14 searches one or more databases of file names and displays the
15 file names that contain the pattern. Patterns can contain shell-style
16 metacharacters: `*', `?', and `[]'. The metacharacters do not treat
17 `/' or `.' specially. Therefore, a pattern `foo*bar' can match a
18 file name that contains `foo3/bar', and a pattern `*duck*' can match a
19 file name that contains `lake/.ducky'. Patterns that contain
20 metacharacters should be quoted to protect them from expansion by the
23 If a pattern is a plain string \(em it contains no metacharacters \(em
25 displays all file names in the database that contain that string
26 anywhere. If a pattern does contain metacharacters,
28 only displays file names that match the pattern exactly. As a result,
29 patterns that contain metacharacters should usually begin with a `*',
30 and will most often end with one as well. The exceptions are patterns
31 that are intended to explicitly match the beginning or end of a file
34 The file name databases contain lists of files that were on the system
35 when the databases were last updated. The system administrator can
36 choose the file name of the default database, the frequency with which
37 the databases are updated, and the directories for which they contain
38 entries; see \fBupdatedb\fP(1L).
41 .I "\-d \fIpath\fP, \-\-database=\fIpath\fP"
42 Instead of searching the default file name database, search the file
43 name databases in \fIpath\fP, which is a colon-separated list of
44 database file names. You can also use the environment variable
46 to set the list of database files to search.
47 The option overrides the environment variable if both are used.
49 The file name database format changed starting with GNU
53 version 4.0 to allow machines with diffent byte orderings to share
54 the databases. This version of
56 can automatically recognize and read databases produced for older
64 .I "\-e, \-\-existing"
65 Only print out such names that currently exist (instead of such names
66 that existed when the database was created).
67 Note that this may slow down the program a lot, if there are many matches
70 .I "\-i, \-\-ignore-case"
71 Ignore case distinctions in both the pattern and the file names.
74 Print a summary of the options to
79 Print the version number of
85 Colon-separated list of databases to search.
87 \fBfind\fP(1L), \fBlocatedb\fP(5L), \fBupdatedb\fP(1L), \fBxargs\fP(1L)
88 \fBFinding Files\fP (on-line in Info, or printed)