]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/find/find.1
This commit was generated by cvs2svn to compensate for changes in r97049,
[FreeBSD/FreeBSD.git] / usr.bin / find / find.1
1 .\"     The Regents of the University of California.  All rights reserved.
2 .\"
3 .\" This code is derived from software contributed to Berkeley by
4 .\" the Institute of Electrical and Electronics Engineers, Inc.
5 .\"
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
8 .\" are met:
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\"    notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\"    notice, this list of conditions and the following disclaimer in the
13 .\"    documentation and/or other materials provided with the distribution.
14 .\" 3. All advertising materials mentioning features or use of this software
15 .\"    must display the following acknowledgement:
16 .\"     This product includes software developed by the University of
17 .\"     California, Berkeley and its contributors.
18 .\" 4. Neither the name of the University nor the names of its contributors
19 .\"    may be used to endorse or promote products derived from this software
20 .\"    without specific prior written permission.
21 .\"
22 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
23 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
26 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
28 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
29 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" SUCH DAMAGE.
33 .\"
34 .\"     @(#)find.1      8.7 (Berkeley) 5/9/95
35 .\" $FreeBSD$
36 .\"
37 .Dd May 3, 2001
38 .Dt FIND 1
39 .Os
40 .Sh NAME
41 .Nm find
42 .Nd walk a file hierarchy
43 .Sh SYNOPSIS
44 .Nm
45 .Op Fl H | Fl L | Fl P
46 .Op Fl EXdsx
47 .Op Fl f Ar pathname
48 .Op Ar pathname ...
49 .Ar expression
50 .Sh DESCRIPTION
51 The
52 .Nm
53 utility recursively descends the directory tree for each
54 .Ar pathname
55 listed, evaluating an
56 .Ar expression
57 (composed of the
58 .Dq primaries
59 and
60 .Dq operands
61 listed below) in terms
62 of each file in the tree.
63 .Pp
64 The options are as follows:
65 .Bl -tag -width indent
66 .It Fl E
67 Interpret regular expressions followed by
68 .Ic -regex
69 and
70 .Ic -iregex
71 options as extended (modern) regular expressions rather than basic
72 regular expressions (BRE's).
73 The
74 .Xr re_format 7
75 manual page fully describes both formats.
76 .It Fl H
77 The
78 .Fl H
79 option causes the file information and file type (see
80 .Xr stat 2 )
81 returned for each symbolic link specified on the command line to be
82 those of the file referenced by the link, not the link itself.
83 If the referenced file does not exist, the file information and type will
84 be for the link itself.
85 File information of all symbolic links not on
86 the command line is that of the link itself.
87 .It Fl L
88 The
89 .Fl L
90 option causes the file information and file type (see
91 .Xr stat 2 )
92 returned for each symbolic link to be those of the file referenced by the
93 link, not the link itself.
94 If the referenced file does not exist, the file information and type will
95 be for the link itself.
96 .It Fl P
97 The
98 .Fl P
99 option causes the file information and file type (see
100 .Xr stat 2 )
101 returned for each symbolic link to be those of the link itself.
102 This is the default.
103 .It Fl X
104 The
105 .Fl X
106 option is a modification to permit
107 .Nm
108 to be safely used in conjunction with
109 .Xr xargs 1 .
110 If a file name contains any of the delimiting characters used by
111 .Xr xargs 1 ,
112 a diagnostic message is displayed on standard error, and the file
113 is skipped.
114 The delimiting characters include single
115 .Pq Dq Li " ' "
116 and double
117 .Pq Dq Li " \*q "
118 quotes, backslash
119 .Pq Dq Li \e ,
120 space, tab and newline characters.
121 .Pp
122 However, you may wish to consider the
123 .Fl print0
124 primary in conjunction with
125 .Ql xargs -0
126 as an effective alternative.
127 .It Fl d
128 The
129 .Fl d
130 option causes
131 .Nm
132 to perform a depth\-first traversal, i.e., directories
133 are visited in post\-order and all entries in a directory will be acted
134 on before the directory itself.
135 By default,
136 .Nm
137 visits directories in pre\-order, i.e., before their contents.
138 Note, the default is
139 .Em not
140 a breadth\-first traversal.
141 .It Fl f
142 The
143 .Fl f
144 option specifies a file hierarchy for
145 .Nm
146 to traverse.
147 File hierarchies may also be specified as the operands immediately
148 following the options.
149 .It Fl s
150 The
151 .Fl s
152 option causes
153 .Nm
154 to traverse the file hierarchies in lexicographical order,
155 i.e., alphabetical order within each directory.
156 Note:
157 .Ql find -s
158 and
159 .Ql "find | sort"
160 may give different results.
161 .It Fl x
162 The
163 .Fl x
164 option prevents
165 .Nm
166 from descending into directories that have a device number different
167 than that of the file from which the descent began.
168 .El
169 .Sh PRIMARIES
170 .Bl -tag -width indent
171 .It Ic -amin Ar n
172 True if the difference between the file last access time and the time
173 .Nm
174 was started, rounded up to the next full minute, is
175 .Ar n
176 minutes.
177 .It Ic -anewer Ar file
178 Same as
179 .Ic -neweram .
180 .It Ic -atime Ar n Ns Op Cm smhdw
181 If no units are specified, this primary evaluates to
182 true if the difference between the file last access time and the time
183 .Nm
184 was started, rounded up to the next full 24\-hour period, is
185 .Ar n
186 24\-hour periods.
187 .Pp
188 If units are specified, this primary evaluates to
189 true if the difference between the file last access time and the time
190 .Nm
191 was started is exactly
192 .Ar n
193 units.
194 Possible time units are as follows:
195 .Pp
196 .Bl -tag -width indent -compact
197 .It Cm s
198 second
199 .It Cm m
200 minute (60 seconds)
201 .It Cm h
202 hour (60 minutes)
203 .It Cm d
204 day (24 hours)
205 .It Cm w
206 week (7 days)
207 .El
208 .Pp
209 Any number of units may be combined in one
210 .Ic -atime
211 argument, for example,
212 .Dq Li "-atime -1h30m" .
213 Units are probably only useful when used in conjunction with the
214 .Cm +
215 or
216 .Cm -
217 modifier.
218 .It Ic -cmin Ar n
219 True if the difference between the time of last change of file status
220 information and the time
221 .Nm
222 was started, rounded up to the next full minute, is
223 .Ar n
224 minutes.
225 .It Ic -cnewer Ar file
226 Same as
227 .Ic -newercm .
228 .It Ic -ctime Ar n Ns Op Cm smhdw
229 If no units are specified, this primary evaluates to
230 true if the difference between the time of last change of file status
231 information and the time
232 .Nm
233 was started, rounded up to the next full 24\-hour period, is
234 .Ar n
235 24\-hour periods.
236 .Pp
237 If units are specified, this primary evaluates to
238 true if the difference between the time of last change of file status
239 information and the time
240 .Nm
241 was started is exactly
242 .Ar n
243 units.
244 Please refer to the
245 .Ic -atime
246 primary description for information on supported time units.
247 .It Ic -delete
248 Delete found files and/or directories.
249 Always returns true.
250 This executes
251 from the current working directory as
252 .Nm
253 recurses down the tree.
254 It will not attempt to delete a filename with a
255 .Dq Pa /
256 character in its pathname relative to
257 .Dq Pa \&.
258 for security reasons.
259 Depth\-first traversal processing is implied by this option.
260 .It Ic -depth
261 Always true;
262 same as the
263 .Fl d
264 option.
265 .Ic -depth
266 can be useful when
267 .Nm
268 is used with
269 .Xr cpio 1
270 to process files that are contained in directories with unusual permissions.
271 It ensures that you have write permission while you are placing files in a
272 directory, then sets the directory's permissions as the last thing.
273 .It Ic -empty
274 True if the current file or directory is empty.
275 .It Ic -exec Ar utility Op Ar argument ... ;
276 True if the program named
277 .Ar utility
278 returns a zero value as its exit status.
279 Optional
280 .Ar arguments
281 may be passed to the utility.
282 The expression must be terminated by a semicolon
283 .Pq Dq Li \&; .
284 If the string
285 .Dq Li {}
286 appears anywhere in the utility name or the
287 arguments it is replaced by the pathname of the current file.
288 .Ar Utility
289 will be executed from the directory from which
290 .Nm
291 was executed.
292 .Ar Utility
293 and
294 .Ar arguments
295 are not subject to the further expansion of shell patterns
296 and constructs.
297 .It Ic -execdir Ar utility Op Ar argument ... ;
298 The
299 .Ic -execdir
300 primary is identical to the
301 .Ic -exec
302 primary with the exception that
303 .Ar utility
304 will be executed from the directory that holds
305 the current file.
306 The filename substituted for
307 the string
308 .Dq Li {}
309 is not qualified.
310 .It Ic -flags Oo Cm - Ns | Ns Cm + Oc Ns Ar flags , Ns Ar notflags
311 The flags are specified using symbolic names (see
312 .Xr chflags 1 ) .
313 Those with the
314 .Qq Li no
315 prefix (except
316 .Qq Li nodump )
317 are said to be
318 .Ar notflags .
319 Flags in
320 .Ar flags
321 are checked to be set, and flags in
322 .Ar notflags
323 are checked to be not set.
324 Note that this is different from
325 .Ic -perm ,
326 which only allows the user to specify mode bits that are set.
327 .Pp
328 If flags are preceded by a dash
329 .Pq Dq Li - ,
330 this primary evaluates to true
331 if at least all of the bits in
332 .Ar flags
333 and none of the bits in
334 .Ar notflags
335 are set in the file's flags bits.
336 If flags are preceded by a plus
337 .Pq Dq Li + ,
338 this primary evaluates to true
339 if any of the bits in
340 .Ar flags
341 is set in the file's flags bits,
342 or any of the bits in
343 .Ar notflags
344 is not set in the file's flags bits.
345 Otherwise,
346 this primary evaluates to true
347 if the bits in
348 .Ar flags
349 exactly match the file's flags bits,
350 and none of the
351 .Ar flags
352 bits match those of
353 .Ar notflags .
354 .It Ic -fstype Ar type
355 True if the file is contained in a filesystem of type
356 .Ar type .
357 The
358 .Xr sysctl 8
359 command can be used to find out the types of filesystems
360 that are available on the system:
361 .Pp
362 .Dl "sysctl vfs"
363 .Pp
364 In addition, there are two pseudo-types,
365 .Dq Li local
366 and
367 .Dq Li rdonly .
368 The former matches any filesystem physically mounted on the system where
369 the
370 .Nm
371 is being executed and the latter matches any filesystem which is
372 mounted read-only.
373 .It Ic -group Ar gname
374 True if the file belongs to the group
375 .Ar gname .
376 If
377 .Ar gname
378 is numeric and there is no such group name, then
379 .Ar gname
380 is treated as a group ID.
381 .It Ic -iname Ar pattern
382 Like
383 .Ic -name ,
384 but the match is case insensitive.
385 .It Ic -inum Ar n
386 True if the file has inode number
387 .Ar n .
388 .It Ic -ipath Ar pattern
389 Like
390 .Ic -path ,
391 but the match is case insensitive.
392 .It Ic -iregex Ar pattern
393 Like
394 .Ic -regex ,
395 but the match is case insensitive.
396 .It Ic -links Ar n
397 True if the file has
398 .Ar n
399 links.
400 .It Ic -ls
401 This primary always evaluates to true.
402 The following information for the current file is written to standard output:
403 its inode number, size in 512\-byte blocks, file permissions, number of hard
404 links, owner, group, size in bytes, last modification time, and pathname.
405 If the file is a block or character special file, the major and minor numbers
406 will be displayed instead of the size in bytes.
407 If the file is a symbolic link, the pathname of the linked\-to file will be
408 displayed preceded by
409 .Dq Li -> .
410 The format is identical to that produced by
411 .Bk -words
412 .Nm ls Fl dgils .
413 .Ek
414 .It Ic -maxdepth Ar n
415 True if the depth of the current file into the tree is less than or equal to
416 .Ar n .
417 .It Ic -mindepth Ar n
418 True if the depth of the current file into the tree is greater than or equal to
419 .Ar n .
420 .It Ic -mmin Ar n
421 True if the difference between the file last modification time and the time
422 .Nm
423 was started, rounded up to the next full minute, is
424 .Ar n
425 minutes.
426 .It Ic -mnewer Ar file
427 Same as
428 .Ic -newer .
429 .It Ic -mtime Ar n Ns Op Cm smhdw
430 If no units are specified, this primary evaluates to
431 true if the difference between the file last modification time and the time
432 .Nm
433 was started, rounded up to the next full 24\-hour period, is
434 .Ar n
435 24\-hour periods.
436 .Pp
437 If units are specified, this primary evaluates to
438 true if the difference between the file last modification time and the time
439 .Nm
440 was started is exactly
441 .Ar n
442 units.
443 Please refer to the
444 .Ic -atime
445 primary description for information on supported time units.
446 .It Ic -name Ar pattern
447 True if the last component of the pathname being examined matches
448 .Ar pattern .
449 Special shell pattern matching characters
450 .Dq ( Li \&[ ,
451 .Dq Li \&] ,
452 .Dq Li * ,
453 and
454 .Dq Li \&? )
455 may be used as part of
456 .Ar pattern .
457 These characters may be matched explicitly by escaping them with a
458 backslash
459 .Pq Dq Li \e .
460 .It Ic -newer Ar file
461 True if the current file has a more recent last modification time than
462 .Ar file .
463 .It Ic -newer Ns Ar X Ns Ar Y Ar file
464 True if the current file has a more recent last access time
465 .Ar ( X Ns = Ns Cm a ) ,
466 change time
467 .Ar ( X Ns = Ns Cm c ) ,
468 or modification time
469 .Ar ( X Ns = Ns Cm m )
470 than the last access time
471 .Ar ( Y Ns = Ns Cm a ) ,
472 change time
473 .Ar ( Y Ns = Ns Cm c ) ,
474 or modification time
475 .Ar ( Y Ns = Ns Cm m )
476 of
477 .Ar file .
478 In addition, if
479 .Ar Y Ns = Ns Cm t ,
480 then
481 .Ar file
482 is instead interpreted as a direct date specification of the form
483 understood by
484 .Xr cvs 1 .
485 Note that
486 .Ic -newermm
487 is equivalent to
488 .Ic -newer .
489 .It Ic -nogroup
490 True if the file belongs to an unknown group.
491 .It Ic -nouser
492 True if the file belongs to an unknown user.
493 .It Ic -ok Ar utility Op Ar argument ... ;
494 The
495 .Ic -ok
496 primary is identical to the
497 .Ic -exec
498 primary with the exception that
499 .Nm
500 requests user affirmation for the execution of the
501 .Ar utility
502 by printing
503 a message to the terminal and reading a response.
504 If the response is other than
505 .Dq Li y
506 the command is not executed and the
507 value of the
508 .Ic -ok
509 expression is false.
510 .It Ic -okdir Ar utility Op Ar argument ... ;
511 The
512 .Ic -okdir
513 primary is identical to the
514 .Ic -execdir
515 primary with the same exception as described for the
516 .Ic -ok
517 primary.
518 .It Ic -path Ar pattern
519 True if the pathname being examined matches
520 .Ar pattern .
521 Special shell pattern matching characters
522 .Dq ( Li \&[ ,
523 .Dq Li \&] ,
524 .Dq Li * ,
525 and
526 .Dq Li \&? )
527 may be used as part of
528 .Ar pattern .
529 These characters may be matched explicitly by escaping them with a
530 backslash
531 .Pq Dq Li \e .
532 Slashes
533 .Pq Dq Li /
534 are treated as normal characters and do not have to be
535 matched explicitly.
536 .It Ic -perm Oo Cm - Ns | Ns Cm + Oc Ns Ar mode
537 The
538 .Ar mode
539 may be either symbolic (see
540 .Xr chmod 1 )
541 or an octal number.
542 If the
543 .Ar mode
544 is symbolic, a starting value of zero is assumed and the
545 .Ar mode
546 sets or clears permissions without regard to the process' file mode
547 creation mask.
548 If the
549 .Ar mode
550 is octal, only bits 07777
551 .Pq Dv S_ISUID | S_ISGID | S_ISTXT | S_IRWXU | S_IRWXG | S_IRWXO
552 of the file's mode bits participate
553 in the comparison.
554 If the
555 .Ar mode
556 is preceded by a dash
557 .Pq Dq Li - ,
558 this primary evaluates to true
559 if at least all of the bits in the
560 .Ar mode
561 are set in the file's mode bits.
562 If the
563 .Ar mode
564 is preceded by a plus
565 .Pq Dq Li + ,
566 this primary evaluates to true
567 if any of the bits in the
568 .Ar mode
569 are set in the file's mode bits.
570 Otherwise, this primary evaluates to true if
571 the bits in the
572 .Ar mode
573 exactly match the file's mode bits.
574 Note, the first character of a symbolic mode may not be a dash
575 .Pq Dq Li - .
576 .It Ic -print
577 This primary always evaluates to true.
578 It prints the pathname of the current file to standard output.
579 If none of
580 .Ic -exec , -ls , -print0 ,
581 or
582 .Ic -ok
583 is specified, the given expression shall be effectively replaced by
584 .Cm \&( Ar "given expression" Cm \&) Ic -print .
585 .It Ic -print0
586 This primary always evaluates to true.
587 It prints the pathname of the current file to standard output, followed by an
588 .Tn ASCII NUL
589 character (character code 0).
590 .It Ic -prune
591 This primary always evaluates to true.
592 It causes
593 .Nm
594 to not descend into the current file.
595 Note, the
596 .Ic -prune
597 primary has no effect if the
598 .Fl d
599 option was specified.
600 .It Ic -regex Ar pattern
601 True if the whole path of the file matches
602 .Ar pattern
603 using regular expression.
604 To match a file named
605 .Dq Pa ./foo/xyzzy ,
606 you can use the regular expression
607 .Dq Li ".*/[xyz]*"
608 or
609 .Dq Li ".*/foo/.*" ,
610 but not
611 .Dq Li xyzzy
612 or
613 .Dq Li /foo/ .
614 .It Ic -size Ar n Ns Op Cm c
615 True if the file's size, rounded up, in 512\-byte blocks is
616 .Ar n .
617 If
618 .Ar n
619 is followed by a
620 .Cm c ,
621 then the primary is true if the
622 file's size is
623 .Ar n
624 bytes (characters).
625 .It Ic -type Ar t
626 True if the file is of the specified type.
627 Possible file types are as follows:
628 .Pp
629 .Bl -tag -width indent -compact
630 .It Cm b
631 block special
632 .It Cm c
633 character special
634 .It Cm d
635 directory
636 .It Cm f
637 regular file
638 .It Cm l
639 symbolic link
640 .It Cm p
641 FIFO
642 .It Cm s
643 socket
644 .El
645 .It Ic -user Ar uname
646 True if the file belongs to the user
647 .Ar uname .
648 If
649 .Ar uname
650 is numeric and there is no such user name, then
651 .Ar uname
652 is treated as a user ID.
653 .El
654 .Pp
655 All primaries which take a numeric argument allow the number to be
656 preceded by a plus sign
657 .Pq Dq Li +
658 or a minus sign
659 .Pq Dq Li - .
660 A preceding plus sign means
661 .Dq more than n ,
662 a preceding minus sign means
663 .Dq less than n
664 and neither means
665 .Dq exactly n .
666 .Sh OPERATORS
667 The primaries may be combined using the following operators.
668 The operators are listed in order of decreasing precedence.
669 .Pp
670 .Bl -tag -width "( expression )" -compact
671 .It Cm \&( Ar expression Cm \&)
672 This evaluates to true if the parenthesized expression evaluates to
673 true.
674 .Pp
675 .It Cm \&! Ar expression
676 This is the unary
677 .Tn NOT
678 operator.
679 It evaluates to true if the expression is false.
680 .Pp
681 .It Ar expression Cm -and Ar expression
682 .It Ar expression expression
683 The
684 .Cm -and
685 operator is the logical
686 .Tn AND
687 operator.
688 As it is implied by the juxtaposition of two expressions it does not
689 have to be specified.
690 The expression evaluates to true if both expressions are true.
691 The second expression is not evaluated if the first expression is false.
692 .Pp
693 .It Ar expression Cm -or Ar expression
694 The
695 .Cm -or
696 operator is the logical
697 .Tn OR
698 operator.
699 The expression evaluates to true if either the first or the second expression
700 is true.
701 The second expression is not evaluated if the first expression is true.
702 .El
703 .Pp
704 All operands and primaries must be separate arguments to
705 .Nm .
706 Primaries which themselves take arguments expect each argument
707 to be a separate argument to
708 .Nm .
709 .Sh EXAMPLES
710 The following examples are shown as given to the shell:
711 .Bl -tag -width indent
712 .It Li "find / \e! -name \*q*.c\*q -print"
713 Print out a list of all the files whose names do not end in
714 .Pa .c .
715 .It Li "find / -newer ttt -user wnj -print"
716 Print out a list of all the files owned by user
717 .Dq wnj
718 that are newer
719 than the file
720 .Pa ttt .
721 .It Li "find / \e! \e( -newer ttt -user wnj \e) -print"
722 Print out a list of all the files which are not both newer than
723 .Pa ttt
724 and owned by
725 .Dq wnj .
726 .It Li "find / \e( -newer ttt -or -user wnj \e) -print"
727 Print out a list of all the files that are either owned by
728 .Dq wnj
729 or that are newer than
730 .Pa ttt .
731 .It Li "find . -newerct '1 minute ago' -print"
732 Print out a list of all the files whose inode change time is more
733 recent than the current time minus one minute.
734 .El
735 .Sh SEE ALSO
736 .Xr chflags 1 ,
737 .Xr chmod 1 ,
738 .Xr cvs 1 ,
739 .Xr locate 1 ,
740 .Xr whereis 1 ,
741 .Xr which 1 ,
742 .Xr xargs 1 ,
743 .Xr stat 2 ,
744 .Xr fts 3 ,
745 .Xr getgrent 3 ,
746 .Xr getpwent 3 ,
747 .Xr strmode 3 ,
748 .Xr re_format 7 ,
749 .Xr symlink 7
750 .Sh STANDARDS
751 The
752 .Nm
753 utility syntax is a superset of the syntax specified by the
754 .St -p1003.2
755 standard.
756 .Pp
757 All the single character options as well as the
758 .Ic -iname , -inum , -iregex , -print0 , -delete , -ls ,
759 and
760 .Ic -regex
761 primaries are extensions to
762 .St -p1003.2 .
763 .Pp
764 Historically, the
765 .Fl d , h
766 and
767 .Fl x
768 options were implemented using the primaries
769 .Ic -depth , -follow ,
770 and
771 .Ic -xdev .
772 These primaries always evaluated to true.
773 As they were really global variables that took effect before the traversal
774 began, some legal expressions could have unexpected results.
775 An example is the expression
776 .Ic -print Cm -o Ic -depth .
777 As
778 .Ic -print
779 always evaluates to true, the standard order of evaluation
780 implies that
781 .Ic -depth
782 would never be evaluated.
783 This is not the case.
784 .Pp
785 The operator
786 .Cm -or
787 was implemented as
788 .Cm -o ,
789 and the operator
790 .Cm -and
791 was implemented as
792 .Cm -a .
793 .Pp
794 Historic implementations of the
795 .Ic -exec
796 and
797 .Ic -ok
798 primaries did not replace the string
799 .Dq Li {}
800 in the utility name or the
801 utility arguments if it had preceding or following non-whitespace characters.
802 This version replaces it no matter where in the utility name or arguments
803 it appears.
804 .Pp
805 The
806 .Fl E
807 option was implemented on the analogy of
808 .Xr grep 1
809 and
810 .Xr sed 1 .
811 .Sh BUGS
812 The special characters used by
813 .Nm
814 are also special characters to many shell programs.
815 In particular, the characters
816 .Dq Li * ,
817 .Dq Li \&[ ,
818 .Dq Li \&] ,
819 .Dq Li \&? ,
820 .Dq Li \&( ,
821 .Dq Li \&) ,
822 .Dq Li \&! ,
823 .Dq Li \e
824 and
825 .Dq Li \&;
826 may have to be escaped from the shell.
827 .Pp
828 As there is no delimiter separating options and file names or file
829 names and the
830 .Ar expression ,
831 it is difficult to specify files named
832 .Pa -xdev
833 or
834 .Pa \&! .
835 These problems are handled by the
836 .Fl f
837 option and the
838 .Xr getopt 3
839 .Dq Fl Fl
840 construct.
841 .Pp
842 The
843 .Ic -delete
844 primary does not interact well with other options that cause the filesystem
845 tree traversal options to be changed.
846 .Sh HISTORY
847 A
848 .Nm
849 command appeared in
850 .At v1 .