[BACK]Return to find.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / find

Annotation of src/usr.bin/find/find.1, Revision 1.38

1.38    ! millert     1: .\"    $OpenBSD: find.1,v 1.37 2003/03/07 06:30:38 david Exp $
1.1       deraadt     2: .\" Copyright (c) 1990, 1993
                      3: .\"    The Regents of the University of California.  All rights reserved.
                      4: .\"
                      5: .\" This code is derived from software contributed to Berkeley by
                      6: .\" the Institute of Electrical and Electronics Engineers, Inc.
                      7: .\"
                      8: .\" Redistribution and use in source and binary forms, with or without
                      9: .\" modification, are permitted provided that the following conditions
                     10: .\" are met:
                     11: .\" 1. Redistributions of source code must retain the above copyright
                     12: .\"    notice, this list of conditions and the following disclaimer.
                     13: .\" 2. Redistributions in binary form must reproduce the above copyright
                     14: .\"    notice, this list of conditions and the following disclaimer in the
                     15: .\"    documentation and/or other materials provided with the distribution.
1.38    ! millert    16: .\" 3. Neither the name of the University nor the names of its contributors
1.1       deraadt    17: .\"    may be used to endorse or promote products derived from this software
                     18: .\"    without specific prior written permission.
                     19: .\"
                     20: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     21: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     22: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     23: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     24: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     25: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     26: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     27: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     28: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     29: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     30: .\" SUCH DAMAGE.
                     31: .\"
                     32: .\"    from: @(#)find.1        8.1 (Berkeley) 6/6/93
                     33: .\"
1.24      millert    34: .Dd December 4, 1999
1.1       deraadt    35: .Dt FIND 1
                     36: .Os
                     37: .Sh NAME
                     38: .Nm find
                     39: .Nd walk a file hierarchy
                     40: .Sh SYNOPSIS
                     41: .Nm find
1.35      millert    42: .Op Fl dHhLXxW
1.1       deraadt    43: .Op Fl f Ar file
1.32      heko       44: .Ar file Op Ar ...
1.34      deraadt    45: .Op Ar expression
1.1       deraadt    46: .Sh DESCRIPTION
1.22      aaron      47: .Nm
1.1       deraadt    48: recursively descends the directory tree for each
                     49: .Ar file
                     50: listed, evaluating an
                     51: .Ar expression
1.22      aaron      52: (composed of the
                     53: .Dq primaries
                     54: and
1.33      hugh       55: .Dq operands
1.22      aaron      56: listed below) in terms
1.12      millert    57: of each file in the tree.
1.34      deraadt    58: In the absence of an expression,
                     59: .Ic -print
                     60: is assumed.
1.1       deraadt    61: .Pp
                     62: The options are as follows:
                     63: .Bl -tag -width Ds
                     64: .It Fl d
1.16      aaron      65: Causes
1.22      aaron      66: .Nm
                     67: to perform a depth-first traversal, i.e., directories
                     68: are visited in post-order and all entries in a directory will be acted
1.1       deraadt    69: on before the directory itself.
                     70: By default,
1.22      aaron      71: .Nm
                     72: visits directories in pre-order, i.e., before their contents.
1.1       deraadt    73: Note, the default is
1.22      aaron      74: .Em not
                     75: a breadth-first traversal.
1.16      aaron      76: .It Fl f Ar file
                     77: Specifies a file hierarchy for
1.22      aaron      78: .Nm
1.1       deraadt    79: to traverse.
                     80: File hierarchies may also be specified as the operands immediately
                     81: following the options.
1.35      millert    82: .It Fl H
                     83: Causes the file information and file type (see
                     84: .Xr stat 2 )
                     85: returned for each symbolic link encountered on the command line to be
                     86: those of the file referenced by the link, not the link itself.
                     87: If the referenced file does not exist, the file information and type will
                     88: be for the link itself.
                     89: File information of all symbolic links not on
                     90: the command line is that of the link itself.
1.1       deraadt    91: .It Fl h
1.35      millert    92: An alias for the
                     93: .Fl L
                     94: option.
1.37      david      95: This option exists for backwards compatibility.
1.35      millert    96: .It Fl L
1.16      aaron      97: Causes the file information and file type (see
1.22      aaron      98: .Xr stat 2 )
1.1       deraadt    99: returned for each symbolic link to be those of the file referenced by the
                    100: link, not the link itself.
                    101: If the referenced file does not exist, the file information and type will
                    102: be for the link itself.
                    103: .It Fl X
1.16      aaron     104: Permit
1.1       deraadt   105: .Nm
                    106: to be safely used in conjunction with
                    107: .Xr xargs 1 .
                    108: If a file name contains any of the delimiting characters used by
                    109: .Xr xargs ,
                    110: a diagnostic message is displayed on standard error, and the file
                    111: is skipped.
1.22      aaron     112: The delimiting characters include single
                    113: .Pq Ql '
                    114: and double
                    115: .Pq Ql \&"
                    116: quotes, backslash
                    117: .Pq Ql \e ,
                    118: space, tab, and newline
                    119: .Pq Sq \en
                    120: characters.
1.4       deraadt   121: As an alternative, the
                    122: .Fl print0
                    123: function may be used safely in conjunction with the
                    124: .Fl 0
                    125: argument to
1.16      aaron     126: .Xr xargs 1 .
1.1       deraadt   127: .It Fl x
1.16      aaron     128: Prevents
1.22      aaron     129: .Nm
1.1       deraadt   130: from descending into directories that have a device number different
                    131: than that of the file from which the descent began.
1.19      espie     132: .It Fl W
                    133: Let
                    134: .Nm
                    135: take whiteouts into account when scanning directories.
1.1       deraadt   136: .El
                    137: .Sh PRIMARIES
                    138: .Bl -tag -width Ds
1.22      aaron     139: .It Ic -amin Ar n
1.15      deraadt   140: True if the difference between the file last access time and the time
1.22      aaron     141: .Nm
1.20      aaron     142: was started, rounded up to the next full minute, is
1.15      deraadt   143: .Ar n
1.20      aaron     144: minutes.
1.24      millert   145: .It Ic -anewer Ar file
                    146: True if the current file has a more recent last access time than
1.25      aaron     147: .Ar file .
1.22      aaron     148: .It Ic -atime Ar n
1.1       deraadt   149: True if the difference between the file last access time and the time
1.22      aaron     150: .Nm
                    151: was started, rounded up to the next full 24-hour period, is
1.1       deraadt   152: .Ar n
1.22      aaron     153: 24-hour periods.
                    154: .It Ic -cmin Ar n
1.15      deraadt   155: True if the difference between the time of last change of file status
                    156: information and the time
1.22      aaron     157: .Nm
1.20      aaron     158: was started, rounded up to the next full minute, is
1.15      deraadt   159: .Ar n
1.20      aaron     160: minutes.
1.24      millert   161: .It Ic -cnewer Ar file
                    162: True if the current file has a more recent last change time than
1.25      aaron     163: .Ar file .
1.22      aaron     164: .It Ic -ctime Ar n
1.1       deraadt   165: True if the difference between the time of last change of file status
                    166: information and the time
1.22      aaron     167: .Nm
                    168: was started, rounded up to the next full 24-hour period, is
1.1       deraadt   169: .Ar n
1.22      aaron     170: 24-hour periods.
1.8       tholo     171: .It Ic -empty
                    172: True if the current file or directory is empty.
1.22      aaron     173: .It Ic -exec Ar utility Op argument ... ;
1.1       deraadt   174: True if the program named
                    175: .Ar utility
                    176: returns a zero value as its exit status.
                    177: Optional arguments may be passed to the utility.
1.22      aaron     178: The expression must be terminated by a semicolon
                    179: .Pq Ql \&; .
                    180: If the string
                    181: .Qq {}
                    182: appears anywhere in the utility name or the
1.1       deraadt   183: arguments it is replaced by the pathname of the current file.
1.16      aaron     184: .Ar utility
1.1       deraadt   185: will be executed from the directory from which
1.22      aaron     186: .Nm
1.1       deraadt   187: was executed.
1.22      aaron     188: .It Ic -execdir Ar utility Op argument ... ;
                    189: Identical to the
1.10      millert   190: .Ic -exec
                    191: primary with the exception that
1.16      aaron     192: .Ar utility
1.10      millert   193: will be executed from the directory that holds
1.25      aaron     194: the current file.
                    195: The filename substituted for the string
1.22      aaron     196: .Qq {}
                    197: is not qualified.
1.28      millert   198: .It Xo
                    199: .Ic -flags
                    200: .Op Fl
                    201: .Ar flags
                    202: .Xc
                    203: The
                    204: .Ar flags
                    205: are comma-separated symbolic file flags (see
                    206: .Xr chflags 1
                    207: for a list of valid flag names).
                    208: If the flags are preceded by a dash
                    209: .Pq Sq \- ,
                    210: this primary evaluates to true if the file in question has at least
                    211: one of the file flags specified by
                    212: .Ar flags .
                    213: If the flags are not preceded by a dash, this primary evaluates to true if the
                    214: flags specified exactly match those of the file.
1.2       deraadt   215: .It Ic -follow
                    216: Follow symbolic links.
1.22      aaron     217: .It Ic -fstype Ar type
1.1       deraadt   218: True if the file is contained in a file system of type
                    219: .Ar type .
1.22      aaron     220: Two special file system types are recognized:
                    221: .Dq local
                    222: and
                    223: .Dq rdonly .
1.1       deraadt   224: These do not describe actual file system types;
                    225: the former matches any file system physically mounted on the system where
1.22      aaron     226: .Nm
                    227: is being executed whereas the latter matches any file system which is
1.1       deraadt   228: mounted read-only.
1.22      aaron     229: .It Ic -group Ar gname
1.1       deraadt   230: True if the file belongs to the group
1.25      aaron     231: .Ar gname .
1.1       deraadt   232: If
                    233: .Ar gname
                    234: is numeric and there is no such group name, then
                    235: .Ar gname
1.16      aaron     236: is treated as a group ID.
1.27      deraadt   237: .It Ic -iname Ar pattern
                    238: True if the last component of the pathname being examined
                    239: matches
                    240: .Ar pattern .
                    241: Case insensitive.
1.22      aaron     242: .It Ic -inum Ar n
1.1       deraadt   243: True if the file has inode number
1.25      aaron     244: .Ar n .
1.22      aaron     245: .It Ic -links Ar n
1.1       deraadt   246: True if the file has
                    247: .Ar n
                    248: links.
                    249: .It Ic -ls
                    250: This primary always evaluates to true.
                    251: The following information for the current file is written to standard output:
1.22      aaron     252: its inode number, size in 512-byte blocks, file permissions, number of hard
1.1       deraadt   253: links, owner, group, size in bytes, last modification time, and pathname.
                    254: If the file is a block or character special file, the major and minor numbers
                    255: will be displayed instead of the size in bytes.
1.22      aaron     256: If the file is a symbolic link, the pathname of the linked-to file will be
                    257: displayed preceded by
                    258: .Dq \-> .
                    259: The format is identical to that produced by
                    260: .Dq ls \-dgils .
1.6       tholo     261: .It Ic -maxdepth Ar n
1.7       tholo     262: True if the current search depth is less than or equal to what is specified in
                    263: .Ar n .
                    264: .It Ic -mindepth Ar n
                    265: True if the current search depth is at least what is specified in
1.6       tholo     266: .Ar n .
1.22      aaron     267: .It Ic -mmin Ar n
1.15      deraadt   268: True if the difference between the file last modification time and the time
1.22      aaron     269: .Nm
1.20      aaron     270: was started, rounded up to the next full minute, is
1.15      deraadt   271: .Ar n
1.20      aaron     272: minutes.
1.22      aaron     273: .It Ic -mtime Ar n
1.1       deraadt   274: True if the difference between the file last modification time and the time
1.22      aaron     275: .Nm
                    276: was started, rounded up to the next full 24-hour period, is
1.1       deraadt   277: .Ar n
1.22      aaron     278: 24-hour periods.
                    279: .It Ic -name Ar pattern
1.1       deraadt   280: True if the last component of the pathname being examined matches
1.25      aaron     281: .Ar pattern .
1.22      aaron     282: Special shell pattern matching characters
                    283: .Pf ( Ql [ ,
                    284: .Ql \&] ,
                    285: .Ql * ,
                    286: and
                    287: .Ql ? )
1.1       deraadt   288: may be used as part of
1.25      aaron     289: .Ar pattern .
1.1       deraadt   290: These characters may be matched explicitly by escaping them with a
1.22      aaron     291: backslash
                    292: .Pq Ql \e .
                    293: .It Ic -newer Ar file
1.1       deraadt   294: True if the current file has a more recent last modification time than
1.25      aaron     295: .Ar file .
1.1       deraadt   296: .It Ic -nouser
                    297: True if the file belongs to an unknown user.
                    298: .It Ic -nogroup
                    299: True if the file belongs to an unknown group.
1.22      aaron     300: .It Ic \&-ok Ar utility Op argument ... ;
                    301: Identical to the
                    302: .Ic -exec
                    303: primary with the exception that
                    304: .Nm
                    305: requests user affirmation for the execution of
                    306: .Ar utility
                    307: by printing
                    308: a message to the terminal and reading a response.
                    309: If the response is other than
                    310: .Sq y
                    311: the command is not executed and the
                    312: value of the
                    313: .Ic \&ok
                    314: expression is false.
                    315: .It Ic -path Ar pattern
1.1       deraadt   316: True if the pathname being examined matches
1.25      aaron     317: .Ar pattern .
1.22      aaron     318: Special shell pattern matching characters
                    319: .Pf ( Ql [ ,
                    320: .Ql \&] ,
                    321: .Ql * ,
                    322: and
                    323: .Ql ? )
1.1       deraadt   324: may be used as part of
1.25      aaron     325: .Ar pattern .
1.1       deraadt   326: These characters may be matched explicitly by escaping them with a
1.22      aaron     327: backslash
                    328: .Pq Ql \e .
                    329: Slashes
                    330: .Pq Ql /
                    331: are treated as normal characters and do not have to be
1.1       deraadt   332: matched explicitly.
1.21      aaron     333: .It Xo
                    334: .Ic -perm
                    335: .Op Fl
                    336: .Ar mode
                    337: .Xc
1.1       deraadt   338: The
                    339: .Ar mode
                    340: may be either symbolic (see
1.25      aaron     341: .Xr chmod 1 )
1.1       deraadt   342: or an octal number.
                    343: If the mode is symbolic, a starting value of zero is assumed and the
1.16      aaron     344: mode sets or clears permissions without regard to the process's file mode
1.1       deraadt   345: creation mask.
                    346: If the mode is octal, only bits 07777
                    347: .Pf ( Dv S_ISUID
                    348: |
                    349: .Dv S_ISGID
                    350: |
                    351: .Dv S_ISTXT
                    352: |
                    353: .Dv S_IRWXU
                    354: |
                    355: .Dv S_IRWXG
                    356: |
                    357: .Dv S_IRWXO )
                    358: of the file's mode bits participate
                    359: in the comparison.
1.22      aaron     360: If the mode is preceded by a dash
                    361: .Pq Sq \- ,
                    362: this primary evaluates to true
1.1       deraadt   363: if at least all of the bits in the mode are set in the file's mode bits.
1.22      aaron     364: If the mode is not preceded by a dash, this primary evaluates to
1.16      aaron     365: true if the bits in the mode exactly match the file's mode bits.
1.22      aaron     366: Note, the first character of a symbolic mode may not be a dash.
1.1       deraadt   367: .It Ic -print
                    368: This primary always evaluates to true.
                    369: It prints the pathname of the current file to standard output, followed
1.22      aaron     370: by a newline
                    371: .Pq Ql \en
                    372: character.
1.1       deraadt   373: If neither
                    374: .Ic -exec ,
                    375: .Ic -ls ,
                    376: .Ic -ok ,
                    377: nor
                    378: .Ic -print0
                    379: is specified, the given expression shall be effectively replaced by
1.22      aaron     380: .Cm \&( Ns Ar given\& expression Ns Cm \&)
1.1       deraadt   381: .Ic -print .
                    382: .It Ic -print0
                    383: This primary always evaluates to true.
                    384: It prints the pathname of the current file to standard output, followed
                    385: by a null character.
                    386: .It Ic -prune
                    387: This primary always evaluates to true.
                    388: It causes
1.22      aaron     389: .Nm
1.1       deraadt   390: to not descend into the current file.
                    391: Note, the
                    392: .Ic -prune
                    393: primary has no effect if the
                    394: .Fl d
                    395: option was specified.
1.22      aaron     396: .It Ic -size Ar n Ns Op Cm c
                    397: True if the file's size, rounded up, in 512-byte blocks is
1.25      aaron     398: .Ar n .
1.1       deraadt   399: If
                    400: .Ar n
1.22      aaron     401: is followed by a
                    402: .Sq c ,
                    403: then the primary is true if the
1.1       deraadt   404: file's size is
                    405: .Ar n
                    406: bytes.
1.22      aaron     407: .It Ic -type Ar t
1.1       deraadt   408: True if the file is of the specified type.
                    409: Possible file types are as follows:
                    410: .Pp
                    411: .Bl -tag -width flag -offset indent -compact
1.3       deraadt   412: .It Cm W
1.22      aaron     413: whiteout (currently, these won't even be visible without also specifying
1.19      espie     414: .Fl W )
1.1       deraadt   415: .It Cm b
                    416: block special
                    417: .It Cm c
                    418: character special
                    419: .It Cm d
                    420: directory
                    421: .It Cm f
                    422: regular file
                    423: .It Cm l
                    424: symbolic link
                    425: .It Cm p
                    426: FIFO
                    427: .It Cm s
                    428: socket
                    429: .El
                    430: .Pp
1.22      aaron     431: .It Ic -user Ar uname
1.1       deraadt   432: True if the file belongs to the user
1.25      aaron     433: .Ar uname .
1.1       deraadt   434: If
                    435: .Ar uname
                    436: is numeric and there is no such user name, then
                    437: .Ar uname
1.16      aaron     438: is treated as a user ID.
1.1       deraadt   439: .El
                    440: .Pp
                    441: All primaries which take a numeric argument allow the number to be
1.22      aaron     442: preceded by a plus sign
                    443: .Pq Ql +
                    444: or a minus sign
                    445: .Pq Ql \- .
                    446: A preceding plus sign means
                    447: .Dq more than n ,
                    448: a preceding minus sign means
                    449: .Dq less than n ,
                    450: and neither means
                    451: .Dq exactly n .
1.1       deraadt   452: .Sh OPERATORS
                    453: The primaries may be combined using the following operators.
                    454: The operators are listed in order of decreasing precedence.
1.22      aaron     455: .Bl -tag -width (expression)
                    456: .It Cm \&( Ns Ar expression Ns Cm \&)
1.1       deraadt   457: This evaluates to true if the parenthesized expression evaluates to
                    458: true.
                    459: .Pp
1.22      aaron     460: .It Cm \&! Ns Ar expression
1.1       deraadt   461: This is the unary
                    462: .Tn NOT
                    463: operator.
                    464: It evaluates to true if the expression is false.
                    465: .Pp
1.22      aaron     466: .It Ar expression Cm -and Ar expression
                    467: .It Ar expression expression
1.1       deraadt   468: The
                    469: .Cm -and
                    470: operator is the logical
                    471: .Tn AND
                    472: operator.
                    473: As it is implied by the juxtaposition of two expressions it does not
                    474: have to be specified.
                    475: The expression evaluates to true if both expressions are true.
                    476: The second expression is not evaluated if the first expression is false.
                    477: .Pp
1.22      aaron     478: .It Ar expression Cm -or Ar expression
1.1       deraadt   479: The
                    480: .Cm -or
                    481: operator is the logical
                    482: .Tn OR
                    483: operator.
                    484: The expression evaluates to true if either the first or the second expression
                    485: is true.
                    486: The second expression is not evaluated if the first expression is true.
                    487: .El
                    488: .Pp
                    489: All operands and primaries must be separate arguments to
1.22      aaron     490: .Nm find .
1.1       deraadt   491: Primaries which themselves take arguments expect each argument
                    492: to be a separate argument to
1.22      aaron     493: .Nm find .
1.1       deraadt   494: .Sh EXAMPLES
                    495: The following examples are shown as given to the shell:
                    496: .Bl -tag -width findx
1.36      deraadt   497: .It Li "$ find  /  \e!  -name  \*q*.c\*q  -print"
1.22      aaron     498: Print out a list of all the files whose names do not end in
1.31      deraadt   499: .Dq \&.c .
1.36      deraadt   500: .It Li "$ find  /  -newer  ttt  -user  wnj  -print"
1.22      aaron     501: Print out a list of all the files owned by user
                    502: .Dq wnj
                    503: that are newer
                    504: than the file
                    505: .Dq ttt .
1.36      deraadt   506: .It Li "$ find  /  \e!  \e(  -newer  ttt  -user  wnj  \e)  -print"
1.22      aaron     507: Print out a list of all the files which are not both newer than
                    508: .Dq ttt
                    509: and owned by
                    510: .Dq wnj .
1.36      deraadt   511: .It Li "$ find  /  \e(  -newer  ttt  -or  -user wnj  \e)  -print"
1.22      aaron     512: Print out a list of all the files that are either owned by
                    513: .Dq wnj
                    514: or
                    515: that are newer than
                    516: .Dq ttt .
1.1       deraadt   517: .El
                    518: .Sh SEE ALSO
1.29      millert   519: .Xr chflags 1 ,
1.1       deraadt   520: .Xr chmod 1 ,
                    521: .Xr locate 1 ,
1.23      aaron     522: .Xr whereis 1 ,
                    523: .Xr which 1 ,
1.1       deraadt   524: .Xr stat 2 ,
                    525: .Xr fts 3 ,
1.16      aaron     526: .Xr getgrent 3 ,
1.1       deraadt   527: .Xr getpwent 3 ,
                    528: .Xr strmode 3 ,
                    529: .Xr symlink 7
                    530: .Sh STANDARDS
                    531: The
1.22      aaron     532: .Nm
1.1       deraadt   533: utility syntax is a superset of the syntax specified by the
                    534: .St -p1003.2
                    535: standard.
                    536: .Pp
1.13      deraadt   537: The options and primaries
1.18      deraadt   538: .Ic -amin ,
                    539: .Ic -cmin ,
1.9       tholo     540: .Ic -empty ,
1.1       deraadt   541: .Ic -follow ,
                    542: .Ic -fstype ,
1.27      deraadt   543: .Ic -iname ,
1.2       deraadt   544: .Ic -inum ,
1.1       deraadt   545: .Ic -links ,
1.9       tholo     546: .Ic -ls ,
1.18      deraadt   547: .Ic -mmin ,
1.9       tholo     548: .Ic -maxdepth ,
1.13      deraadt   549: .Ic -mindepth ,
                    550: .Ic -execdir ,
1.1       deraadt   551: and
                    552: .Ic -print0
1.13      deraadt   553: are extensions to
1.1       deraadt   554: .St -p1003.2 .
1.27      deraadt   555: The
                    556: .Ic -iname
                    557: option was inspired by GNU find.
1.1       deraadt   558: .Pp
                    559: Historically, the
                    560: .Fl d ,
1.26      aaron     561: .Fl H ,
1.1       deraadt   562: and
                    563: .Fl x
1.14      deraadt   564: options were implemented using the primaries
                    565: .Ic -depth ,
                    566: .Ic -follow ,
                    567: and
                    568: .Ic -xdev .
1.1       deraadt   569: These primaries always evaluated to true.
                    570: As they were really global variables that took effect before the traversal
                    571: began, some legal expressions could have unexpected results.
1.22      aaron     572: An example is the expression
                    573: .Dq \-print \-o \-depth .
                    574: As
                    575: .Cm \-print
                    576: always evaluates to true, the standard order of evaluation
                    577: implies that
                    578: .Cm \-depth
                    579: would never be evaluated.
1.1       deraadt   580: This is not the case.
                    581: .Pp
1.22      aaron     582: The operator
                    583: .Cm -or
                    584: was implemented as
                    585: .Cm \-o ,
                    586: and the operator
                    587: .Cm -and
                    588: was implemented as
                    589: .Cm \-a .
1.1       deraadt   590: .Pp
                    591: Historic implementations of the
                    592: .Ic -exec
                    593: and
                    594: .Ic -ok
1.22      aaron     595: primaries did not replace the string
                    596: .Qq {}
                    597: in the utility name or the
1.1       deraadt   598: utility arguments if it had preceding or following non-whitespace characters.
                    599: This version replaces it no matter where in the utility name or arguments
                    600: it appears.
1.30      aaron     601: .Sh HISTORY
                    602: A
                    603: .Nm
                    604: command appeared in
                    605: .At v1 .
1.1       deraadt   606: .Sh BUGS
                    607: The special characters used by
1.22      aaron     608: .Nm
1.1       deraadt   609: are also special characters to many shell programs.
1.22      aaron     610: In particular, the characters
                    611: .Ql * ,
                    612: .Ql [ ,
                    613: .Ql \&] ,
                    614: .Ql ? ,
                    615: .Ql ( ,
                    616: .Ql \&) ,
                    617: .Ql ! ,
                    618: .Ql \e ,
                    619: and
                    620: .Ql \&;
                    621: may have to be escaped from the shell.
1.1       deraadt   622: .Pp
                    623: As there is no delimiter separating options and file names or file
                    624: names and the
                    625: .Ar expression ,
1.22      aaron     626: it is difficult to specify files named
                    627: .Dq -xdev
                    628: or
                    629: .Dq ! .
1.1       deraadt   630: These problems are handled by the
                    631: .Fl f
                    632: option and the
                    633: .Xr getopt 3
1.22      aaron     634: .Dq \-\-
                    635: construct.
1.19      espie     636: .Pp
                    637: The
                    638: .Fl W
1.26      aaron     639: option is probably not the most elegant way to handle whiteouts.
                    640: It may be replaced by a more sophisticated algorithm eventually.