version 1, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
LOCATE |
|
|
2 |
!!!LOCATE |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
ENVIRONMENT |
|
|
8 |
SEE ALSO |
|
|
9 |
---- |
|
|
10 |
!!NAME |
|
|
11 |
|
|
|
12 |
|
|
|
13 |
locate - list files in databases that match a pattern |
|
|
14 |
!!SYNOPSIS |
|
|
15 |
|
|
|
16 |
|
|
|
17 |
__locate__ [[-d path | --database=path] [[-e | --existing] |
|
|
18 |
[[-i | --ignore-case ] [[--version] [[--help] |
|
|
19 |
pattern... |
|
|
20 |
!!DESCRIPTION |
|
|
21 |
|
|
|
22 |
|
|
|
23 |
This manual page documents the GNU version of __locate__. |
|
|
24 |
For each given pattern, __locate__ searches one or more |
|
|
25 |
databases of file names and displays the file names that |
|
|
26 |
contain the pattern. Patterns can contain shell-style |
|
|
27 |
metacharacters: `*', `?', and `[[]'. The metacharacters do |
|
|
28 |
not treat `/' or `.' specially. Therefore, a pattern |
|
|
29 |
`foo*bar' can match a file name that contains `foo3/bar', |
|
|
30 |
and a pattern `*duck*' can match a file name that contains |
|
|
31 |
`lake/.ducky'. Patterns that contain metacharacters should |
|
|
32 |
be quoted to protect them from expansion by the |
|
|
33 |
shell. |
|
|
34 |
|
|
|
35 |
|
|
|
36 |
If a pattern is a plain string -- it contains no |
|
|
37 |
metacharacters -- __locate__ displays all file names in |
|
|
38 |
the database that contain that string anywhere. If a pattern |
|
|
39 |
does contain metacharacters, __locate__ only displays |
|
|
40 |
file names that match the pattern exactly. As a result, |
|
|
41 |
patterns that contain metacharacters should usually begin |
|
|
42 |
with a `*', and will most often end with one as well. The |
|
|
43 |
exceptions are patterns that are intended to explicitly |
|
|
44 |
match the beginning or end of a file name. |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
The file name databases contain lists of files that were on |
|
|
48 |
the system when the databases were last updated. The system |
|
|
49 |
administrator can choose the file name of the default |
|
|
50 |
database, the frequency with which the databases are |
|
|
51 |
updated, and the directories for which they contain entries; |
|
|
52 |
see __updatedb__(1L). |
|
|
53 |
!!OPTIONS |
|
|
54 |
|
|
|
55 |
|
|
|
56 |
''-d path, --database=path'' |
|
|
57 |
|
|
|
58 |
|
|
|
59 |
Instead of searching the default file name database, search |
|
|
60 |
the file name databases in ''path'', which is a |
|
|
61 |
colon-separated list of database file names. You can also |
|
|
62 |
use the environment variable __LOCATE_PATH__ to set the |
|
|
63 |
list of database files to search. The option overrides the |
|
|
64 |
environment variable if both are used. |
|
|
65 |
|
|
|
66 |
|
|
|
67 |
The file name database format changed starting with GNU |
|
|
68 |
__find__ and __locate__ version 4.0 to allow machines |
|
|
69 |
with diffent byte orderings to share the databases. This |
|
|
70 |
version of __locate__ can automatically recognize and |
|
|
71 |
read databases produced for older versions of GNU |
|
|
72 |
__locate__ or Unix versions of __locate__ or |
|
|
73 |
__find__. |
|
|
74 |
|
|
|
75 |
|
|
|
76 |
''-e, --existing'' |
|
|
77 |
|
|
|
78 |
|
|
|
79 |
Only print out such names that currently exist (instead of |
|
|
80 |
such names that existed when the database was created). Note |
|
|
81 |
that this may slow down the program a lot, if there are many |
|
|
82 |
matches in the database. |
|
|
83 |
|
|
|
84 |
|
|
|
85 |
''-i, --ignore-case'' |
|
|
86 |
|
|
|
87 |
|
|
|
88 |
Ignore case distinctions in both the pattern and the file |
|
|
89 |
names. |
|
|
90 |
|
|
|
91 |
|
|
|
92 |
''--help'' |
|
|
93 |
|
|
|
94 |
|
|
|
95 |
Print a summary of the options to __locate__ and |
|
|
96 |
exit. |
|
|
97 |
|
|
|
98 |
|
|
|
99 |
''--version'' |
|
|
100 |
|
|
|
101 |
|
|
|
102 |
Print the version number of __locate__ and |
|
|
103 |
exit. |
|
|
104 |
!!ENVIRONMENT |
|
|
105 |
|
|
|
106 |
|
|
|
107 |
__LOCATE_PATH__ |
|
|
108 |
|
|
|
109 |
|
|
|
110 |
Colon-separated list of databases to search. |
|
|
111 |
!!SEE ALSO |
|
|
112 |
|
|
|
113 |
|
|
|
114 |
__find__(1L), __locatedb__(5L), __updatedb__(1L), |
|
|
115 |
__xargs__(1L) __Finding Files__ (on-line in Info, or |
|
|
116 |
printed) |
|
|
117 |
---- |