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