Refactored time handling routines in preparation for support of absolute timestamp...
[findutils.git] / find / find.1
blobdeab915c17421cc95b28328e6e70df8bc3c96152
1 .TH FIND 1 \" -*- nroff -*-
2 .SH NAME
3 find \- search for files in a directory hierarchy
4 .SH SYNOPSIS
5 .B find
6 [path...] [expression]
7 .SH DESCRIPTION
8 This manual page
9 documents the GNU version of
10 .BR find .
11 .B find
12 searches the directory tree rooted at each given file name by
13 evaluating the given expression from left to right, according to the
14 rules of precedence (see section OPERATORS), until the outcome is
15 known (the left hand side is false for \fIand\fR operations, true for
16 \fIor\fR), at which point
17 .B find
18 moves on to the next file name.
19 .PP
20 The first argument that begins with `\-', `(', `)', `,', or `!' is taken
21 to be the beginning of the expression; any arguments before it are
22 paths to search, and any arguments after it are the rest of the
23 expression.  If no paths are given, the current directory is used.  If
24 no expression is given, the expression `\-print' is used (but you
25 should probably consider using `\-print0' instead, anyway).
27 .SH EXPRESSIONS
29 The expression is made up of options (which affect overall operation
30 rather than the processing of a specific file, and always return true),
31 tests (which return a true or false value), and actions (which have side
32 effects and return a true or false value), all separated by operators.
33 \-and is assumed where the operator is omitted.  If the expression contains
34 no actions other than \-prune, \-print is performed on all files
35 for which the expression is true.
36 .SS OPTIONS
38 All options always return true.  They always take effect, rather than
39 being processed only when their place in the expression is reached.
40 Therefore, for clarity, it is best to place them at the beginning of
41 the expression.
42 .IP \-daystart
43 Measure times (for \-amin, \-atime, \-cmin, \-ctime, \-mmin, and \-mtime)
44 from the beginning of today rather than from 24 hours ago.
45 .IP \-depth
46 Process each directory's contents before the directory itself.
47 .IP \-d
48 A synonym for \-depth, for compatibility with FreeBSD, MacOS X and OpenBSD.
49 .IP \-follow
50 Dereference symbolic links.  Implies \-noleaf.
51 .IP "\-help, \-\-help"
52 Print a summary of the command-line usage of
53 .B find
54 and exit.
55 .IP "\-maxdepth \fIlevels\fR"
56 Descend at most \fIlevels\fR (a non-negative integer) levels of
57 directories below the command line arguments.  `\-maxdepth 0' means
58 only apply the tests and actions to the command line arguments.
59 .IP "\-mindepth \fIlevels\fR"
60 Do not apply any tests or actions at levels less than \fIlevels\fR (a
61 non-negative integer).  `\-mindepth 1' means process all files except
62 the command line arguments.
63 .IP \-mount
64 Don't descend directories on other filesystems.  An alternate name for
65 \-xdev, for compatibility with some other versions of
66 .BR find .
67 .IP "\-noleaf"
68 Do not optimize by assuming that directories contain 2 fewer
69 subdirectories than their hard link count.  This option is needed when
70 searching filesystems that do not follow the Unix directory-link
71 convention, such as CD-ROM or MS-DOS filesystems or AFS volume mount
72 points.  Each directory on a normal Unix filesystem has at least 2
73 hard links: its name and its `.'  entry.  Additionally, its
74 subdirectories (if any) each have a `..'  entry linked to that
75 directory.  When
76 .B find
77 is examining a directory, after it has statted 2 fewer subdirectories
78 than the directory's link count, it knows that the rest of the entries
79 in the directory are non-directories (`leaf' files in the directory
80 tree).  If only the files' names need to be examined, there is no need
81 to stat them; this gives a significant increase in search speed.
82 .IP "\-version, \-\-version"
83 Print the \fBfind\fR version number and exit.
84 .IP \-xdev
85 Don't descend directories on other filesystems.
86 .SS TESTS
88 Numeric arguments can be specified as
89 .IP \fI+n\fP
90 for greater than
91 .IR n ,
92 .IP \fI\-n\fP
93 for less than
94 .IR n ,
95 .IP \fIn\fP
96 for exactly
97 .IR n .
98 .IP "\-amin \fIn\fR"
99 File was last accessed \fIn\fR minutes ago.
100 .IP "\-anewer \fIfile\fR"
101 File was last accessed more recently than \fIfile\fR was modified.
102 \-anewer is affected by \-follow only if \-follow comes before
103 \-anewer on the command line.
104 .IP "\-atime \fIn\fR"
105 File was last accessed \fIn\fR*24 hours ago.
106 .IP "\-cmin \fIn\fR"
107 File's status was last changed \fIn\fR minutes ago.
108 .IP "\-cnewer \fIfile\fR"
109 File's status was last changed more recently than \fIfile\fR was modified.
110 \-cnewer is affected by \-follow only if \-follow comes before
111 \-cnewer on the command line.
112 .IP "\-ctime \fIn\fR"
113 File's status was last changed \fIn\fR*24 hours ago.
114 .IP \-empty
115 File is empty and is either a regular file or a directory.
116 .IP \-false
117 Always false.
118 .IP "\-fstype \fItype\fR"
119 File is on a filesystem of type \fItype\fR.  The valid filesystem
120 types vary among different versions of Unix; an incomplete list of
121 filesystem types that are accepted on some version of Unix or another
122 is: ufs, 4.2, 4.3, nfs, tmp, mfs, S51K, S52K.  You can use \-printf
123 with the %F directive to see the types of your filesystems.
124 .IP "\-gid \fIn\fR"
125 File's numeric group ID is \fIn\fR.
126 .IP "\-group \fIgname\fR"
127 File belongs to group \fIgname\fR (numeric group ID allowed).
128 .IP "\-ilname \fIpattern\fR"
129 Like \-lname, but the match is case insensitive.
130 .IP "\-iname \fIpattern\fR"
131 Like \-name, but the match is case insensitive.  For example, the
132 patterns `fo*' and `F??' match the file names `Foo', `FOO', `foo',
133 `fOo', etc.   In these patterns, unlike filename expansion by the
134 shell, an initial '.' can be matched by '*'.  That is, 
135 .B find -name *bar 
136 will match the file `.foobar'.
138 .IP "\-inum \fIn\fR"
139 File has inode number \fIn\fR.
140 .IP "\-ipath \fIpattern\fR"
141 Behaves in the same way as \-iwholename.  This option is deprecated,
142 so please do not use it.
143 .IP "\-iregex \fIpattern\fR"
144 Like \-regex, but the match is case insensitive.
145 .IP "\-iwholename \fIpattern\fR"
146 Like \-wholename, but the match is case insensitive.
147 .IP "\-links \fIn\fR"
148 File has \fIn\fR links.
149 .IP "\-lname \fIpattern\fR"
150 File is a symbolic link whose contents match shell pattern
151 \fIpattern\fR.  The metacharacters do not treat `/' or `.' specially.
152 .IP "\-mmin \fIn\fR"
153 File's data was last modified \fIn\fR minutes ago.
154 .IP "\-mtime \fIn\fR"
155 File's data was last modified \fIn\fR*24 hours ago.
156 .IP "\-name \fIpattern\fR"
157 Base of file name (the path with the leading directories removed)
158 matches shell pattern \fIpattern\fR.  The metacharacters (`*', `?',
159 and `[]') match a `.' at the start of the base name (this is a change
160 in findutils-4.2.2; see section STANDARDS CONFORMANCE below).  To ignore a
161 directory and the files under it, use \-prune; see an example in the
162 description of \-wholename.  Braces are not recognised as being
163 special, despite the fact that some shells including Bash ibmue braces
164 with a special meaning in shell patterns.  The filename matching is
165 performed with the use of the
166 .BR fnmatch (3) 
167 library function.
168 .IP "\-newer \fIfile\fR"
169 File was modified more recently than \fIfile\fR.
170 \-newer is affected by \-follow only if \-follow comes before
171 \-newer on the command line.
172 .IP \-nouser
173 No user corresponds to file's numeric user ID.
174 .IP \-nogroup
175 No group corresponds to file's numeric group ID.
176 .IP "\-path \fIpattern\fR"
177 See \-wholename.   The predicate \-path is also supported by HP-UX 
178 .BR find .
179 .IP "\-perm \fImode\fR"
180 File's permission bits are exactly \fImode\fR (octal or symbolic).
181 Symbolic modes use mode 0 as a point of departure.
182 .IP "\-perm \-\fImode\fR"
183 All of the permission bits \fImode\fR are set for the file.
184 .IP "\-perm +\fImode\fR"
185 Any of the permission bits \fImode\fR are set for the file.
186 .IP "\-regex \fIpattern\fR"
187 File name matches regular expression \fIpattern\fR.  This is a match
188 on the whole path, not a search.  For example, to match a file named
189 `./fubar3', you can use the regular expression `.*bar.' or `.*b.*3',
190 but not `b.*r3'.  The regular expressions understood by 
191 .B find 
192 follow the conventions for the 
193 .B re_match 
194 system library function where this is present (i.e. on systems using
195 the GNU C Library).  On other systems, the implementation within
196 Gnulib is used; by default, Gnulib provides "basic" regular
197 expressions.
198 .IP "\-size \fIn\fR[cwbkMG]"
199 File uses \fIn\fP units of space.  The following suffixes 
200 can be used:
202 .IP `b' 
203 for 512-byte blocks (this is the default if no suffix is used)
204 .IP `c' 
205 for bytes
206 .IP `w' 
207 for two-byte words
208 .IP `k' 
209 for Kilobytes (units of 1024 bytes)
210 .IP `M' 
211 for Megabytes (units of 1048576 bytes)
212 .IP `G' 
213 for Gigabytes (units of 1073741824 bytes)
216 The size does not count indirect blocks, but it does count blocks in
217 sparse files that are not actually allocated.  Bear in mind that the
218 `%k' and `%b' format specifiers of \-printf handle sparse files
219 differently.  The `b' suffix always denotes 512-byte blocks and never
220 1 Kilobyte blocks, which is different to the behaviour of \-ls.
222 .IP \-true
223 Always true.
224 .IP "\-type \fIc\fR"
225 File is of type \fIc\fR:
227 .IP b
228 block (buffered) special
229 .IP c
230 character (unbuffered) special
231 .IP d
232 directory
233 .IP p
234 named pipe (FIFO)
235 .IP f
236 regular file
237 .IP l
238 symbolic link
239 .IP s
240 socket
241 .IP D
242 door (Solaris)
244 .IP "\-uid \fIn\fR"
245 File's numeric user ID is \fIn\fR.
246 .IP "\-used \fIn\fR"
247 File was last accessed \fIn\fR days after its status was last changed.
248 .IP "\-user \fIuname\fR"
249 File is owned by user \fIuname\fR (numeric user ID allowed).
250 .IP "\-wholename \fIpattern\fR"
251 File name matches shell pattern \fIpattern\fR.  The metacharacters do
252 not treat `/' or `.' specially; so, for example,
254 .in +1i
255 find . \-wholename './sr*sc'
257 .in -1i
258 will print an entry for a directory called './src/misc' (if one
259 exists).  To ignore a whole directory tree, use \-prune rather than
260 checking every file in the tree.  For example, to skip the
261 directory `src/emacs' and all files and directories under it, and
262 print the names of the other files found, do something like this:
264 .in +1i
265 find . \-wholename './src/emacs' -prune -o -print
267 .in -1i
268 .IP "\-xtype \fIc\fR"
269 The same as \-type unless the file is a symbolic link.  For symbolic
270 links: if \-follow has not been given, true if the file is a link to a
271 file of type \fIc\fR; if \-follow has been given, true if \fIc\fR is
272 `l'.  In other words, for symbolic links, \-xtype checks the type of
273 the file that \-type does not check.
274 .SS ACTIONS
275 .IP "\-delete\fR"
276 Delete files; true if removal succeeded.  If the removal failed, an
277 error message is issued.
278 .IP "\-exec \fIcommand\fR ;"
279 Execute \fIcommand\fR; true if 0 status is returned.  All following
280 arguments to
281 .B find
282 are taken to be arguments to the command until an argument consisting
283 of `;' is encountered.  The string `{}' is replaced by the current
284 file name being processed everywhere it occurs in the arguments to the
285 command, not just in arguments where it is alone, as in some versions
287 .BR find .
288 Both of these constructions might need to be escaped (with a `\e') or
289 quoted to protect them from expansion by the shell.  See the
290 .IP "\-exec \fIcommand\fR +"
291 This variant of \-exec is not yet supported, but is required by POSIX.
293 .B EXAMPLES
294 section for examples of the use of the `-exec' option.
295 The command is
296 executed in the starting directory.
298 .IP "\-fls \fIfile\fR"
299 True; like \-ls but write to \fIfile\fR like \-fprint.
300 The output file is always created, even if the predicate is never matched.
301 .IP "\-fprint \fIfile\fR"
302 True; print the full file name into file \fIfile\fR.  If \fIfile\fR
303 does not exist when \fBfind\fR is run, it is created; if it does
304 exist, it is truncated.  The file names ``/dev/stdout'' and
305 ``/dev/stderr'' are handled specially; they refer to the standard
306 output and standard error output, respectively.
307 The output file is always created, even if the predicate is never matched.
308 .IP "\-fprint0 \fIfile\fR"
309 True; like \-print0 but write to \fIfile\fR like \-fprint.
310 The output file is always created, even if the predicate is never matched.
311 .IP "\-fprintf \fIfile\fR \fIformat\fR"
312 True; like \-printf but write to \fIfile\fR like \-fprint.
313 The output file is always created, even if the predicate is never matched.
314 .IP "\-ok \fIcommand\fR ;"
315 Like \-exec but ask the user first (on the standard input); if the
316 response does not start with `y' or `Y', do not run the command, and
317 return false.
318 .IP \-print
319 True; print the full file name on the standard output, followed by a
320 newline.   If you are piping the output of 
321 .B find 
322 into another program and there is the faintest possibility that the files 
323 which you are searching for might contain a newline, then you should 
324 seriously consider using the `\-print0' option instead of `\-print'.
326 .IP \-print0
327 True; print the full file name on the standard output, followed by a
328 null character (instead of the newline character that `-print' uses).
329 This allows file names that contain newlines or other types of white
330 space to be correctly interpreted by programs that process the
331 \fBfind\fR output.  This option corresponds to the `\-0' option of
332 .BR xargs .
333 .IP "\-printf \fIformat\fR"
334 True; print \fIformat\fR on the standard output, interpreting `\e'
335 escapes and `%' directives.  Field widths and precisions can be
336 specified as with the `printf' C function.  Unlike \-print, \-printf
337 does not add a newline at the end of the string.  The escapes and
338 directives are:
340 .IP \ea
341 Alarm bell.
342 .IP \eb
343 Backspace.
344 .IP \ec
345 Stop printing from this format immediately and flush the output.
346 .IP \ef
347 Form feed.
348 .IP \en
349 Newline.
350 .IP \er
351 Carriage return.
352 .IP \et
353 Horizontal tab.
354 .IP \ev
355 Vertical tab.
356 .IP \e\0
357 ASCII NUL.
358 .IP \e\e
359 A literal backslash (`\e').
360 .IP \eNNN
361 The character whose ASCII code is NNN (octal).
363 A `\e' character followed by any other character is treated as an
364 ordinary character, so they both are printed.
365 .IP %%
366 A literal percent sign.
367 .IP %a
368 File's last access time in the format returned by the C `ctime' function.
369 .IP %A\fIk\fP
370 File's last access time in the format specified by \fIk\fR, which is
371 either `@' or a directive for the C `strftime' function.  The possible
372 values for \fIk\fR are listed below; some of them might not be
373 available on all systems, due to differences in `strftime' between
374 systems.
376 .IP @
377 seconds since Jan. 1, 1970, 00:00 GMT.
379 Time fields:
380 .IP H
381 hour (00..23)
382 .IP I
383 hour (01..12)
384 .IP k
385 hour ( 0..23)
386 .IP l
387 hour ( 1..12)
388 .IP M
389 minute (00..59)
390 .IP p
391 locale's AM or PM
392 .IP r
393 time, 12-hour (hh:mm:ss [AP]M)
394 .IP S
395 second (00..61)
396 .IP T
397 time, 24-hour (hh:mm:ss)
398 .IP X
399 locale's time representation (H:M:S)
400 .IP Z
401 time zone (e.g., EDT), or nothing if no time zone is determinable
403 Date fields:
404 .IP a
405 locale's abbreviated weekday name (Sun..Sat)
406 .IP A
407 locale's full weekday name, variable length (Sunday..Saturday)
408 .IP b
409 locale's abbreviated month name (Jan..Dec)
410 .IP B
411 locale's full month name, variable length (January..December)
412 .IP c
413 locale's date and time (Sat Nov 04 12:02:33 EST 1989)
414 .IP d
415 day of month (01..31)
416 .IP D
417 date (mm/dd/yy)
418 .IP h
419 same as b
420 .IP j
421 day of year (001..366)
422 .IP m
423 month (01..12)
424 .IP U
425 week number of year with Sunday as first day of week (00..53)
426 .IP w
427 day of week (0..6)
428 .IP W
429 week number of year with Monday as first day of week (00..53)
430 .IP x
431 locale's date representation (mm/dd/yy)
432 .IP y
433 last two digits of year (00..99)
434 .IP Y
435 year (1970...)
437 .IP %b
438 File's size in 512-byte blocks (rounded up).
439 .IP %c
440 File's last status change time in the format returned by the C `ctime'
441 function.
442 .IP %C\fIk\fP
443 File's last status change time in the format specified by \fIk\fR,
444 which is the same as for %A.
445 .IP %d
446 File's depth in the directory tree; 0 means the file is a command line
447 argument.
448 .IP %D
449 The device number on which the file exists (the st_dev field of struct
450 stat), in decimal.
451 .IP %f
452 File's name with any leading directories removed (only the last element).
453 .IP %F
454 Type of the filesystem the file is on; this value can be used for
455 \-fstype.
456 .IP %g
457 File's group name, or numeric group ID if the group has no name.
458 .IP %G
459 File's numeric group ID.
460 .IP %h
461 Leading directories of file's name (all but the last element).
462 .IP %H
463 Command line argument under which file was found.
464 .IP %i
465 File's inode number (in decimal).
466 .IP %k
467 The amount of disk space used for this file in 1K blocks (rounded
468 up).  This is different from %s/1024 if the file is a sparse file.
469 .IP %l
470 Object of symbolic link (empty string if file is not a symbolic link).
471 .IP %m
472 File's permission bits (in octal).  This option uses the 'traditional'
473 numbers which most Unix implementations use, but if your particular 
474 implementation uses an unusual ordering of octal permissions bits, you
475 will see a difference between the actual value of the file's mode and
476 the output of @samp{%m}.
477 .IP %n
478 Number of hard links to file.
479 .IP %p
480 File's name.
481 .IP %P
482 File's name with the name of the command line argument under which
483 it was found removed.
484 .IP %s
485 File's size in bytes.
486 .IP %t
487 File's last modification time in the format returned by the C `ctime'
488 function.
489 .IP %T\fIk\fP
490 File's last modification time in the format specified by \fIk\fR, 
491 which is the same as for %A.
492 .IP %u
493 File's user name, or numeric user ID if the user has no name.
494 .IP %U
495 File's numeric user ID.
496 .IP %y
497 File's type (like in ls -l), U=unknown type (shouldn't happen)
498 .IP %Y
499 File's type (like %y), plus follow symlinks: L=loop, N=nonexistent
501 A `%' character followed by any other character is discarded (but the
502 other character is printed).
504 .IP \-prune
505 If \-depth is not given, true; do not descend the current directory.
507 If \-depth is given, false; no effect.
508 .IP \-ls
509 True; list current file in `ls \-dils' format on standard output.
510 The block counts are of 1K blocks, unless the environment variable
511 POSIXLY_CORRECT is set, in which case 512-byte blocks are used.
512 .IP \-ignore_readdir_race
513 Normally, \fBfind\fR will emit an error message when it fails to stat a file.
514 If you give this option and a file is deleted between the time \fBfind\fR 
515 reads the name of the file from the directory and the time it tries to stat 
516 the file, nno error message will be issued.    This also applies to files
517 or directories whose names are given on the command line.  This option takes
518 effect at the time the command line is read, which means that you cannot search
519 one part of the filesystem with this option on and part of it with this option
520 off (if you need to do that, you will need to issue two \fBfind\fR commands
521 instead, one with the option and one without it).
522 .IP \-noignore_readdir_race
523 Turns off the effect of \-ignore_readdir_race. 
524 .SS OPERATORS
526 Listed in order of decreasing precedence:
527 .IP "( \fIexpr\fR )"
528 Force precedence.
529 .IP "! \fIexpr\fR"
530 True if \fIexpr\fR is false.
531 .IP "\-not \fIexpr\fR"
532 Same as ! \fIexpr\fR.
533 .IP "\fIexpr1 expr2\fR"
534 And (implied); \fIexpr2\fR is not evaluated if \fIexpr1\fR is false.
535 .IP "\fIexpr1\fR \-a \fIexpr2\fR"
536 Same as \fIexpr1 expr2\fR.
537 .IP "\fIexpr1\fR \-and \fIexpr2\fR"
538 Same as \fIexpr1 expr2\fR.
539 .IP "\fIexpr1\fR \-o \fIexpr2\fR"
540 Or; \fIexpr2\fR is not evaluated if \fIexpr1\fR is true.
541 .IP "\fIexpr1\fR \-or \fIexpr2\fR"
542 Same as \fIexpr1\fR \-o \fIexpr2\fR.
543 .IP "\fIexpr1\fR , \fIexpr2\fR"
544 List; both \fIexpr1\fR and \fIexpr2\fR are always evaluated.
545 The value of \fIexpr1\fR is discarded; the value of the list is the
546 value of \fIexpr2\fR.
548 .SH "STANDARDS CONFORMANCE"
549 The following options are specified in the POSIX standard 
550 (IEEE Std 1003.1, 2003 Edition):
551 .IP "\-name"
552 This option is supported, but POSIX conformance depends on the 
553 POSIX conformance of the system's 
554 .BR fnmatch (3) 
555 library function.  As of findutils-4.2.2, shell metacharacters
556 ('*'. '?' or '[]' for example) will match a leading '.', because 
557 IEEE interpretation 126 requires this.   This is a change from
558 previous versions of findutils.
559 .IP "\-type"
560 Supported.   POSIX specifies `b', `c', `d', `l', `p', `f' and `s'.
561 GNU find also supports `D', representing a Door, where the OS provides these.
563 .IP "\-ok"
564 Supported.   Interpretation of the response is not locale-dependent
565 (see ENVIRONMENT VARIABLES).
567 .IP "\-exec"
568 Supported for the `{} ;' case, but the '{} +' variant is not supported yet.
570 .IP "Other predicates"
571 The predicates
572 `-atime',
573 `-ctime',
574 `-depth',
575 `-group',
576 `-links',
577 `-mtime',
578 `-newer',
579 `-nogroup',
580 `-nouser',
581 `-perm',
582 `-print',
583 `-prune',
584 `-size',
585 `-user' and 
586 `-xdev',
587 are all supported.
590 The POSIX standard specifies parentheses `(', `)', negation `!' and the
591 `and' and `or' operators (`-a', `-o').   
593 All other options, predicates, expressions and so forth are extensions 
594 beyond the POSIX standard.  Many of these extensions are not unique to 
595 GNU find, however.
597 The \-d option is supported for comatibility with various BSD systems,
598 but you should use the POSIX-compliant predicate \-depth instead.
599 .SH "ENVIRONMENT VARIABLES"
600 .IP POSIXLY_CORRECT
601 Determines the block size used by `-ls'.
602 .IP LANG
603 Provides a default value for the internationalization variables that
604 are unset or null.
605 .IP LC_ALL
606 If set to a non-empty string value, override the values of all the
607 other internationalization variables.
608 .IP LC_COLLATE
609 The POSIX standard specifies that this variable affects the pattern
610 matching to be used for the `-name' option.   GNU find uses the 
611 .BR fnmatch (3) 
612 library function, and so support for `LC_COLLATE' depends on the
613 system library.    
615 POSIX also specifies that the `LC_COLLATE' environment 
616 variable affects the interpretation of the user's response to the 
617 query issued by `-ok', but this is not the case for GNU find.
618 .IP LC_CTYPE 
619 This variable affects the treatment of character classes used with 
620 the `-name' option, if the system's 
621 .BR fnmatch (3) 
622 library function supports this.   It has no effect on the behaviour 
623 of the `-ok' expression.
624 .IP LC_MESSAGES
625 Determines the locale to be used for internationalised messages.
626 .IP NLSPATH
627 Determines the location of the internationalisation message catalogues.
628 .IP PATH
629 Affects the directores which are searched to find the executables 
630 invoked by `-exec' and `-ok'.
631 .SH "EXAMPLES"
633 .B find /tmp -name core -type f -print | xargs /bin/rm -f
636 Find files named 
637 .B core
638 in or below the directory 
639 .B /tmp 
640 and delete them.  Note that this will work incorrectly if there are 
641 any filenames containing newlines or spaces.
643 .B find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f
646 Find files named 
647 .B core
648 in or below the directory 
649 .B /tmp 
650 and delete them, processing filenames in such a way that file or 
651 directory names containing spaces or newlines are correctly handled.
654 .B cut -d: -f1 < /etc/passwd | sort | xargs echo
657 Generates a compact listing of all the users on the system.
661 .B find . -type f -exec file '{}' \e\;
664 Runs `file' on every file in or below the current directory.  Notice
665 that the braces are enclosed in single quote marks to protect them
666 from interpretation as shell script punctuation.   The semicolon is
667 similarly protected by the use of a backslash, though ';' could have
668 been used in that case also.
670 .SH EXIT STATUS
672 .B find
673 exits with status 0 if all files are processed successfully, greater
674 than 0 if errors occur.
675 .SH "SEE ALSO"
676 \fBlocate\fP(1), \fBlocatedb\fP(5), \fBupdatedb\fP(1), \fBxargs\fP(1)
677 \fBFinding Files\fP (on-line in Info, or printed)
678 .SH "BUGS"
679 .P 
680 The best way to report a bug is to use the form at
681 http://savannah.gnu.org/bugs/?group=findutils.  
682 The reason for this is that you will then be able to track progress in
683 fixing the problem.   Other comments about \fBfind\fP(1) and about
684 the findutils package in general can be sent to the 
685 .I bug-findutils
686 mailing list.  To join the list, send email to 
687 .IR bug-findutils-request@gnu.org .