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