]>
Commit | Line | Data |
---|---|---|
f3ef9e4d JB |
1 | --- findutils-4.2.26/doc/find.texi.orig 2005-10-31 06:21:47.000000000 +0100 |
2 | +++ findutils-4.2.26/doc/find.texi 2005-11-27 03:30:29.025869696 +0100 | |
6a9f8a7c | 3 | @@ -12,17 +12,11 @@ |
3a694787 JB |
4 | @finalout |
5 | @end iftex | |
6fcd5b1d | 6 | |
3a694787 | 7 | -@dircategory Basics |
ba3aff84 | 8 | +@dircategory Shell utilities: |
3a694787 JB |
9 | @direntry |
10 | -* Finding files: (find). Operating on files matching certain criteria. | |
6a9f8a7c JB |
11 | -@end direntry |
12 | - | |
13 | -@dircategory Individual utilities | |
14 | -@direntry | |
15 | -* find: (find)Invoking find. Finding and acting on files. | |
16 | -* locate: (find)Invoking locate. Finding files in a database. | |
17 | -* updatedb: (find)Invoking updatedb. Building the locate database. | |
18 | -* xargs: (find)Invoking xargs. Operating on many files. | |
3a694787 | 19 | +* Finding files: (find). Operating on files matching certain criteria |
6a9f8a7c JB |
20 | +* find: (find)find. Finding and acting on files |
21 | +* xargs: (find)xargs. Operating on many files | |
3a694787 | 22 | @end direntry |
6fcd5b1d | 23 | |
6a9f8a7c | 24 | @copying |
f3ef9e4d | 25 | @@ -2260,10 +2254,6 @@ |
6a9f8a7c JB |
26 | fileserver where that filesystem is on a local disk, to prevent |
27 | thrashing the network. | |
28 | ||
29 | -@xref{Invoking updatedb}, | |
30 | -for the description of the options to @code{updatedb}, which specify | |
31 | -which directories would each database contain entries for. | |
32 | - | |
33 | ||
34 | @node Database Formats | |
35 | @section Database Formats | |
f3ef9e4d | 36 | @@ -2436,14 +2426,12 @@ |
6a9f8a7c JB |
37 | discussed in this manual. |
38 | ||
39 | @menu | |
40 | -* Invoking find:: | |
41 | -* Invoking locate:: | |
42 | -* Invoking updatedb:: | |
43 | -* Invoking xargs:: | |
44 | +* find:: | |
45 | +* xargs:: | |
46 | * Regular Expressions:: | |
47 | @end menu | |
48 | ||
49 | -@node Invoking find, Invoking locate, , Reference | |
50 | +@node find, xargs, , Reference | |
51 | @section Invoking @code{find} | |
52 | ||
53 | @example | |
f3ef9e4d | 54 | @@ -2511,7 +2499,7 @@ |
6a9f8a7c JB |
55 | @end menu |
56 | ||
57 | ||
58 | -@node Warning Messages,,, Invoking find | |
59 | +@node Warning Messages,,, find | |
60 | @subsection Warning Messages | |
61 | ||
62 | If there is an error on the @code{find} command line, an error message | |
f3ef9e4d | 63 | @@ -2563,243 +2551,7 @@ |
6a9f8a7c JB |
64 | Use of an unrecognised formatting directive with @samp{-fprintf} |
65 | @end itemize | |
66 | ||
67 | -@node Invoking locate, Invoking updatedb, Invoking find, Reference | |
68 | -@section Invoking @code{locate} | |
69 | - | |
70 | -@example | |
71 | -locate @r{[}@var{option}@dots{}@r{]} @var{pattern}@dots{} | |
72 | -@end example | |
73 | - | |
74 | -For each @var{pattern} given @code{locate} searches one or more file | |
75 | -name databases returning each match of @var{pattern}. | |
76 | - | |
77 | -For each @var{pattern} given @code{locate} searches one or more file | |
78 | -name databases returning each match of @var{pattern}. | |
79 | - | |
80 | -@table @code | |
81 | -@item --all | |
82 | -@itemx -A | |
83 | -Print only names which match all non-option arguments, not those | |
84 | -matching one or more non-option arguments. | |
85 | - | |
86 | -@item --basename | |
87 | -@itemx -b | |
88 | -The specified pattern is matched against just the last component of | |
89 | -the name of a file in the @code{locate} database. This last | |
90 | -component is also called the ``base name''. For example, the base | |
91 | -name of @file{/tmp/mystuff/foo.old.c} is @file{foo.old.c}. If the | |
92 | -pattern contains metacharacters, it must match the base name exactly. | |
93 | -If not, it must match part of the base name. | |
94 | - | |
95 | -@item --count | |
96 | -@itemx -c | |
97 | -Instead of printing the matched file names, just print the total | |
98 | -number of matches found, unless @samp{--print} (@samp{-p}) is also | |
99 | -present. | |
100 | - | |
101 | - | |
102 | -@item --database=@var{path} | |
103 | -@itemx -d @var{path} | |
104 | -Instead of searching the default @code{locate} database, @code{locate} search the file | |
105 | -name databases in @var{path}, which is a colon-separated list of | |
106 | -database file names. You can also use the environment variable | |
107 | -@code{LOCATE_PATH} to set the list of database files to search. The | |
108 | -option overrides the environment variable if both are used. Empty | |
109 | -elements in @var{path} (that is, a leading or trailing colon, or two | |
110 | -colons in a row) are taken to stand for the default database. | |
111 | -A database can be supplied on stdin, using @samp{-} as an element | |
112 | -of @samp{path}. If more than one element of @samp{path} is @samp{-}, | |
113 | -later instances are ignored (but a warning message is printed). | |
114 | - | |
115 | -@item --existing | |
116 | -@itemx -e | |
117 | -Only print out such names which currently exist (instead of such names | |
118 | -which existed when the database was created). Note that this may slow | |
119 | -down the program a lot, if there are many matches in the database. | |
120 | -The way in which broken symbolic links are treated is affected by the | |
121 | -@samp{-L}, @samp{-P} and @samp{-H} options. | |
122 | - | |
123 | -@item --non-existing | |
124 | -@itemx -E | |
125 | -Only print out such names which currently do not exist (instead of | |
126 | -such names which existed when the database was created). Note that | |
127 | -this may slow down the program a lot, if there are many matches in the | |
128 | -database. The way in which broken symbolic links are treated is | |
129 | -affected by the @samp{-L}, @samp{-P} and @samp{-H} options. | |
130 | - | |
131 | -@item --follow | |
132 | -@itemx -L | |
133 | -If testing for the existence of files (with the @samp{-e} or @samp{-E} | |
134 | -options), consider broken symbolic links to be non-existing. This is | |
135 | -the default behaviour. | |
136 | - | |
137 | - | |
138 | -@item --nofollow | |
139 | -@itemx -P | |
140 | -@itemx -H | |
141 | -If testing for the existence of files (with the @samp{-e} or @samp{-E} | |
142 | -options), treat broken symbolic links as if they were existing files. | |
143 | -The @samp{-H} form of this option is provided purely for similarity | |
144 | -with @code{find}; the use of @samp{-P} is recommended over @samp{-H}. | |
145 | - | |
146 | -@item --ignore-case | |
147 | -@itemx -i | |
148 | -Ignore case distinctions in both the pattern and the file names. | |
149 | - | |
150 | -@item --limit=N | |
151 | -@itemx -l N | |
152 | -Limit the number of results printed to N. When used with the | |
153 | -@samp{--count} option, the value printed will never be larger than | |
154 | -this limit. | |
155 | - | |
156 | -@item --mmap | |
157 | -@itemx -m | |
158 | -Accepted but does nothing. The option is supported only to provide | |
159 | -compatibility with BSD's @code{locate}. | |
160 | - | |
161 | -@item --null | |
162 | -@itemx -0 | |
163 | -Results are separated with the ASCII NUL character rather than the | |
164 | -newline character. To get the full benefit of the use of this option, | |
165 | -use the new @code{locate} database format (that is the default | |
166 | -anyway). | |
167 | - | |
168 | -@item --print | |
169 | -@itemx -p | |
170 | -Print search results when they normally would not, because of the | |
171 | -presence of @samp{--statistics} (@samp{-S}) or @samp{--count} | |
172 | -(@samp{-c}). | |
173 | - | |
174 | -@item --wholename | |
175 | -@itemx -w | |
176 | -The specified pattern is matched against the whole name of the file in | |
177 | -the @code{locate} database. If the pattern contains metacharacters, | |
178 | -it must match exactly. If not, it must match part of the whole file | |
179 | -name. This is the default behaviour. | |
180 | - | |
181 | -@item --regex | |
182 | -@itemx -r | |
183 | -Instead of using substring or shell glob matching, the pattern | |
184 | -specified on the command line is understood to be a regular | |
185 | -expression. GNU Emacs-style regular expressions are assumed unless | |
186 | -the @samp{--regextype} option is also given. File names from the | |
187 | -@code{locate} database are matched using the specified regular | |
188 | -expression. If the @samp{-i} flag is also given, matching is | |
189 | -case-insensitive. Matches are performed against the whole path name, | |
190 | -and so by default a pathname will be matched if any part of it matches | |
191 | -the specified regular expression. The regular expression may use | |
192 | -@samp{^} or @samp{$} to anchor a match at the beginning or end of a | |
193 | -pathname. | |
194 | - | |
195 | -@item --regextype | |
6a9f8a7c JB |
196 | -This option changes the regular expression syntax and behaviour used |
197 | -by the @samp{--regex} option. @ref{Regular Expressions} for more | |
198 | -information on the regular expression dialects understood by GNU | |
199 | -findutils. | |
200 | - | |
201 | -@item --stdio | |
202 | -@itemx -s | |
203 | -Accepted but does nothing. The option is supported only to provide | |
204 | -compatibility with BSD's @code{locate}. | |
205 | - | |
206 | -@item --statistics | |
207 | -@itemx -S | |
208 | -Print some summary information for each @code{locate} database. No | |
209 | -search is performed unless non-option arguments are given. | |
210 | - | |
211 | -@item --help | |
212 | -Print a summary of the command line usage for @code{locate} and exit. | |
213 | - | |
214 | -@item --version | |
215 | -Print the version number of @code{locate} and exit. | |
216 | -@end table | |
217 | - | |
218 | -@node Invoking updatedb, Invoking xargs, Invoking locate, Reference | |
219 | -@section Invoking @code{updatedb} | |
220 | - | |
221 | -@example | |
222 | -updatedb @r{[}@var{option}@dots{}@r{]} | |
223 | -@end example | |
224 | - | |
225 | -@code{updatedb} creates and updates the database of file names used by | |
226 | -@code{locate}. @code{updatedb} generates a list of files similar to | |
227 | -the output of @code{find} and then uses utilities for optimizing the | |
228 | -database for performance. @code{updatedb} is often run periodically | |
229 | -as a @code{cron} job and configured with environment variables or | |
230 | -command options. Typically, operating systems have a shell script | |
231 | -that ``exports'' configurations for variable definitions and uses | |
232 | -another schell script that ``sources'' the configuration file into the | |
233 | -environment and then executes @code{updatedb} in the environment. | |
234 | - | |
235 | -@code{updatedb} creates and updates the database of file names used by | |
236 | -@code{locate}. @code{updatedb} generates a list of files similar to | |
237 | -the output of @code{find} and then uses utilities for optimizing the | |
238 | -database for performance. @code{updatedb} is often run periodically | |
239 | -as a @code{cron} job and configured with environment variables or | |
240 | -command options. Typically, operating systems have a shell script | |
241 | -that ``exports'' configurations for variable definitions and uses | |
242 | -another schell script that ``sources'' the configuration file into the | |
243 | -environment and then executes @code{updatedb} in the environment. | |
244 | - | |
245 | -@table @code | |
246 | -@item --findoptions='@var{OPTION}@dots{}' | |
247 | -Global options to pass on to @code{find}. | |
248 | -The environment variable @code{FINDOPTIONS} also sets this value. | |
249 | -Default is none. | |
250 | - | |
251 | -@item --localpaths='@var{path}@dots{}' | |
252 | -Non-network directories to put in the database. | |
253 | -Default is @file{/}. | |
254 | - | |
255 | -@item --netpaths='@var{path}@dots{}' | |
256 | -Network (NFS, AFS, RFS, etc.) directories to put in the database. | |
257 | -The environment variable @code{NETPATHS} also sets this value. | |
258 | -Default is none. | |
259 | - | |
260 | -@item --prunepaths='@var{path}@dots{}' | |
261 | -Directories to omit from the database, which would otherwise be | |
262 | -included. The environment variable @code{PRUNEPATHS} also sets this | |
263 | -value. Default is @file{/tmp /usr/tmp /var/tmp /afs}. The paths are | |
264 | -used as regular expressions (with @code{find ... -regex}, so you need | |
265 | -to specify these paths in the same way that @code{find} will encounter | |
266 | -them. This means for example that the paths must not include trailing | |
267 | -slashes. | |
268 | - | |
269 | -@item --prunefs='@var{path}@dots{}' | |
270 | -Filesystems to omit from the database, which would otherwise be | |
271 | -included. Note that files are pruned when a filesystem is reached; | |
272 | -Any filesystem mounted under an undesired filesystem will be ignored. | |
273 | -The environment variable @code{PRUNEFS} also sets this value. Default | |
274 | -is @file{nfs NFS proc}. | |
275 | - | |
276 | -@item --output=@var{dbfile} | |
277 | -The database file to build. Default is system-dependent, but | |
278 | -typically @file{/usr/local/var/locatedb}. | |
279 | - | |
280 | -@item --localuser=@var{user} | |
281 | -The user to search the non-network directories as, using @code{su}. | |
282 | -Default is to search the non-network directories as the current user. | |
283 | -You can also use the environment variable @code{LOCALUSER} to set this user. | |
284 | - | |
285 | -@item --netuser=@var{user} | |
286 | -The user to search network directories as, using @code{su}. Default | |
287 | -@code{user} is @code{daemon}. You can also use the environment variable | |
288 | -@code{NETUSER} to set this user. | |
289 | - | |
290 | -@item --old-format | |
291 | -Generate a @code{locate} database in the old format, for compatibility | |
292 | -with versions of @code{locate} other than GNU @code{locate}. Using | |
293 | -this option means that @code{locate} will not be able to properly | |
294 | -handle non-ASCII characters in file names (that is, file names | |
295 | -containing characters which have the eighth bit set, such as many of | |
296 | -the characters from the ISO-8859-1 character set). | |
297 | -@item --help | |
298 | -Print a summary of the command line usage and exit. | |
299 | -@item --version | |
300 | -Print the version number of @code{updatedb} and exit. | |
301 | -@end table | |
302 | - | |
303 | -@node Invoking xargs, Regular Expressions, Invoking updatedb, Reference | |
304 | +@node xargs, Regular Expressions, find, Reference | |
305 | @section Invoking @code{xargs} | |
306 | ||
307 | @example | |
f3ef9e4d | 308 | @@ -2925,7 +2677,7 @@ |
6a9f8a7c JB |
309 | @end table |
310 | ||
311 | ||
312 | -@node Regular Expressions,, Invoking xargs, Reference | |
313 | +@node Regular Expressions,, xargs, Reference | |
314 | @section Regular Expressions | |
315 | ||
316 | The @samp{-regex} and @samp{-iregex} tests of @code{find} allow |