Fixed Debian bug 175372, inappropriate 'L' suffixes on manual page section indicators
[findutils.git] / locate / locate.1
blobb25add000f226a0b3b47d273044bed82ad36f682
1 .TH LOCATE 1 \" -*- 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] [-e | --existing] [-i | --ignore-case ]
7 [\-\-version] [\-\-help] pattern...
8 .SH DESCRIPTION
9 This manual page
10 documents the GNU version of
11 .BR locate .
12 For each given pattern,
13 .B locate
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
21 shell.
23 If a pattern is a plain string \(em it contains no metacharacters \(em
24 .B locate
25 displays all file names in the database that contain that string
26 anywhere.  If a pattern does contain metacharacters,
27 .B locate
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
32 name.
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(1).
39 .SH OPTIONS
40 .TP
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
45 .B LOCATE_PATH
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
50 .B find
51 and
52 .B locate
53 version 4.0 to allow machines with diffent byte orderings to share
54 the databases.  This version of
55 .B locate
56 can automatically recognize and read databases produced for older
57 versions of GNU
58 .B locate
59 or Unix versions of
60 .B locate
62 .BR find .
63 .TP
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
68 in the database.
69 .TP
70 .I "\-i, \-\-ignore-case"
71 Ignore case distinctions in both the pattern and the file names.
72 .TP
73 .I "\-\-help"
74 Print a summary of the options to
75 .B locate
76 and exit.
77 .TP
78 .I "\-\-version"
79 Print the version number of
80 .B locate
81 and exit.
82 .SH ENVIRONMENT
83 .TP
84 .B LOCATE_PATH
85 Colon-separated list of databases to search.
86 .SH "SEE ALSO"
87 \fBfind\fP(1), \fBlocatedb\fP(5), \fBupdatedb\fP(1), \fBxargs\fP(1)
88 \fBFinding Files\fP (on-line in Info, or printed)
89 .SH "BUGS"
91 The \fBlocate\fP(1) command should be able to handle filenames
92 containing newlines, but doesn't.
94 The best way to report a bug is to use the form at
95 http://savannah.gnu.org/bugs/?group=findutils.  
96 The reason for this is that you will then be able to track progress in
97 fixing the problem.   Other comments about \fBlocate\fP(1) and about
98 the findutils package in general can be sent to the 
99 .I bug-findutils
100 mailing list.  To join the list, send email to 
101 .IR bug-findutils-request@gnu.org .