158540776STim J. Robbins.\" Copyright (c) 1990, 1993 29b50d902SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 39b50d902SRodney W. Grimes.\" 49b50d902SRodney W. Grimes.\" This code is derived from software contributed to Berkeley by 59b50d902SRodney W. Grimes.\" the Institute of Electrical and Electronics Engineers, Inc. 69b50d902SRodney W. Grimes.\" 79b50d902SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 89b50d902SRodney W. Grimes.\" modification, are permitted provided that the following conditions 99b50d902SRodney W. Grimes.\" are met: 109b50d902SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 119b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 129b50d902SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 139b50d902SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 149b50d902SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 15fbbd9655SWarner Losh.\" 3. Neither the name of the University nor the names of its contributors 169b50d902SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 179b50d902SRodney W. Grimes.\" without specific prior written permission. 189b50d902SRodney W. Grimes.\" 199b50d902SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 209b50d902SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 219b50d902SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 229b50d902SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 239b50d902SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 249b50d902SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 259b50d902SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 269b50d902SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 279b50d902SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 289b50d902SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 299b50d902SRodney W. Grimes.\" SUCH DAMAGE. 309b50d902SRodney W. Grimes.\" 31*2a121b97SRicardo Branco.Dd January 15, 2024 329b50d902SRodney W. Grimes.Dt FIND 1 339b50d902SRodney W. Grimes.Os 349b50d902SRodney W. Grimes.Sh NAME 359b50d902SRodney W. Grimes.Nm find 369b50d902SRodney W. Grimes.Nd walk a file hierarchy 379b50d902SRodney W. Grimes.Sh SYNOPSIS 388fe908efSRuslan Ermilov.Nm 399b50d902SRodney W. Grimes.Op Fl H | Fl L | Fl P 407c1d4b3aSAkinori MUSHA.Op Fl EXdsx 41dfab7fb1SRuslan Ermilov.Op Fl f Ar path 42dfab7fb1SRuslan Ermilov.Ar path ... 43dfab7fb1SRuslan Ermilov.Op Ar expression 44107f86a2SStefan Farfeleder.Nm 45107f86a2SStefan Farfeleder.Op Fl H | Fl L | Fl P 46107f86a2SStefan Farfeleder.Op Fl EXdsx 47dfab7fb1SRuslan Ermilov.Fl f Ar path 48dfab7fb1SRuslan Ermilov.Op Ar path ... 49dfab7fb1SRuslan Ermilov.Op Ar expression 509b50d902SRodney W. Grimes.Sh DESCRIPTION 51e8937ba0SPhilippe CharnierThe 52e8937ba0SPhilippe Charnier.Nm 53e8937ba0SPhilippe Charnierutility recursively descends the directory tree for each 54dfab7fb1SRuslan Ermilov.Ar path 559b50d902SRodney W. Grimeslisted, evaluating an 569b50d902SRodney W. Grimes.Ar expression 57bfd12208SRuslan Ermilov(composed of the 58bfd12208SRuslan Ermilov.Dq primaries 59bfd12208SRuslan Ermilovand 60bfd12208SRuslan Ermilov.Dq operands 61bfd12208SRuslan Ermilovlisted below) in terms 629b50d902SRodney W. Grimesof each file in the tree. 639b50d902SRodney W. Grimes.Pp 649b50d902SRodney W. GrimesThe options are as follows: 65bfd12208SRuslan Ermilov.Bl -tag -width indent 667c1d4b3aSAkinori MUSHA.It Fl E 6714ebab25SDag-Erling SmørgravInterpret regular expressions following the 687c1d4b3aSAkinori MUSHA.Ic -regex 697c1d4b3aSAkinori MUSHAand 707c1d4b3aSAkinori MUSHA.Ic -iregex 71fbccd9dbSRuslan Ermilovprimaries as extended (modern) regular expressions rather than basic 72bfd12208SRuslan Ermilovregular expressions (BRE's). 73bfd12208SRuslan ErmilovThe 747c1d4b3aSAkinori MUSHA.Xr re_format 7 757c1d4b3aSAkinori MUSHAmanual page fully describes both formats. 769b50d902SRodney W. Grimes.It Fl H 773c94f41fSPhilippe CharnierCause the file information and file type (see 789b50d902SRodney W. Grimes.Xr stat 2 ) 799b50d902SRodney W. Grimesreturned for each symbolic link specified on the command line to be 809b50d902SRodney W. Grimesthose of the file referenced by the link, not the link itself. 819b50d902SRodney W. GrimesIf the referenced file does not exist, the file information and type will 826df69548SBruce Evansbe for the link itself. 836df69548SBruce EvansFile information of all symbolic links not on 849b50d902SRodney W. Grimesthe command line is that of the link itself. 859b50d902SRodney W. Grimes.It Fl L 863c94f41fSPhilippe CharnierCause the file information and file type (see 879b50d902SRodney W. Grimes.Xr stat 2 ) 889b50d902SRodney W. Grimesreturned for each symbolic link to be those of the file referenced by the 899b50d902SRodney W. Grimeslink, not the link itself. 909b50d902SRodney W. GrimesIf the referenced file does not exist, the file information and type will 919b50d902SRodney W. Grimesbe for the link itself. 9247d91ba3SDag-Erling Smørgrav.Pp 9347d91ba3SDag-Erling SmørgravThis option is equivalent to the deprecated 9447d91ba3SDag-Erling Smørgrav.Ic -follow 9547d91ba3SDag-Erling Smørgravprimary. 969b50d902SRodney W. Grimes.It Fl P 973c94f41fSPhilippe CharnierCause the file information and file type (see 989b50d902SRodney W. Grimes.Xr stat 2 ) 999b50d902SRodney W. Grimesreturned for each symbolic link to be those of the link itself. 1003d9a9402SJohn PolstraThis is the default. 1019b50d902SRodney W. Grimes.It Fl X 1023c94f41fSPhilippe CharnierPermit 1039b50d902SRodney W. Grimes.Nm 1049b50d902SRodney W. Grimesto be safely used in conjunction with 1059b50d902SRodney W. Grimes.Xr xargs 1 . 1069b50d902SRodney W. GrimesIf a file name contains any of the delimiting characters used by 107bfd12208SRuslan Ermilov.Xr xargs 1 , 1089b50d902SRodney W. Grimesa diagnostic message is displayed on standard error, and the file 1099b50d902SRodney W. Grimesis skipped. 110bfd12208SRuslan ErmilovThe delimiting characters include single 111bfd12208SRuslan Ermilov.Pq Dq Li " ' " 112bfd12208SRuslan Ermilovand double 113bfd12208SRuslan Ermilov.Pq Dq Li " \*q " 114bfd12208SRuslan Ermilovquotes, backslash 115bfd12208SRuslan Ermilov.Pq Dq Li \e , 116bfd12208SRuslan Ermilovspace, tab and newline characters. 117a8d50686STom Rhodes.Pp 118a8d50686STom RhodesHowever, you may wish to consider the 119a8d50686STom Rhodes.Fl print0 120a8d50686STom Rhodesprimary in conjunction with 121e2f8ed51SRuslan Ermilov.Dq Nm xargs Fl 0 122a8d50686STom Rhodesas an effective alternative. 1239b50d902SRodney W. Grimes.It Fl d 1243c94f41fSPhilippe CharnierCause 1258fe908efSRuslan Ermilov.Nm 126eb555785SJilles Tjoelkerto perform a depth-first traversal. 12747d91ba3SDag-Erling Smørgrav.Pp 128eb555785SJilles TjoelkerThis option is a BSD-specific equivalent of the 12947d91ba3SDag-Erling Smørgrav.Ic -depth 130eb555785SJilles Tjoelkerprimary specified by 1311c832963SOliver Eikemeier.St -p1003.1-2001 . 132eb555785SJilles TjoelkerRefer to its description under 133eb555785SJilles Tjoelker.Sx PRIMARIES 134eb555785SJilles Tjoelkerfor more information. 13582483ea7SCeri Davies.It Fl f Ar path 13682483ea7SCeri DaviesAdd 13782483ea7SCeri Davies.Ar path 13882483ea7SCeri Daviesto the list of paths that will be recursed into. 13982483ea7SCeri DaviesThis is useful when 14082483ea7SCeri Davies.Ar path 14182483ea7SCeri Daviesbegins with a character that would otherwise be interpreted as an 14282483ea7SCeri Davies.Ar expression , 14382483ea7SCeri Daviesnamely 14482483ea7SCeri Davies.Dq Li "!" , 14582483ea7SCeri Davies.Dq Li "(" 14682483ea7SCeri Daviesand 14782483ea7SCeri Davies.Dq Li - . 1486d0c7e13SWolfram Schneider.It Fl s 1493c94f41fSPhilippe CharnierCause 1508fe908efSRuslan Ermilov.Nm 1516df69548SBruce Evansto traverse the file hierarchies in lexicographical order, 1526df69548SBruce Evansi.e., alphabetical order within each directory. 1536df69548SBruce EvansNote: 154bfd12208SRuslan Ermilov.Ql find -s 1556d0c7e13SWolfram Schneiderand 156bfd12208SRuslan Ermilov.Ql "find | sort" 1576d0c7e13SWolfram Schneidermay give different results. 15826a329f4SEugene Grosbein.Pp 15926a329f4SEugene GrosbeinFor example, 16026a329f4SEugene Grosbein.Ql find -s 16126a329f4SEugene Grosbeinputs a directory 16226a329f4SEugene Grosbein.Ql Ar foo 16326a329f4SEugene Grosbeinwith all its contents before a directory 16426a329f4SEugene Grosbein.Ql Ar foo . 16526a329f4SEugene Grosbeinbut 16626a329f4SEugene Grosbein.Ql "find | sort" 16726a329f4SEugene Grosbeinputs the directory name 16826a329f4SEugene Grosbein.Ql Ar foo . 16926a329f4SEugene Grosbeinbefore any string like 17026a329f4SEugene Grosbein.Ql Ar foo/bar 17126a329f4SEugene Grosbeinbecause 17226a329f4SEugene Grosbein.Ql .\& 17326a329f4SEugene Grosbeingoes before 17426a329f4SEugene Grosbein.Ql / 17593b8510cSGordon Berglingin ASCII. 176321dc6eeSGordon BerglingIn locales other than 17726a329f4SEugene Grosbein.Ar C 178d6054ee6SEugene Grosbeinresults may vary more due to collation differences. 1799b50d902SRodney W. Grimes.It Fl x 1803c94f41fSPhilippe CharnierPrevent 1818fe908efSRuslan Ermilov.Nm 1829b50d902SRodney W. Grimesfrom descending into directories that have a device number different 1839b50d902SRodney W. Grimesthan that of the file from which the descent began. 18447d91ba3SDag-Erling Smørgrav.Pp 18547d91ba3SDag-Erling SmørgravThis option is equivalent to the deprecated 18647d91ba3SDag-Erling Smørgrav.Ic -xdev 18747d91ba3SDag-Erling Smørgravprimary. 1889b50d902SRodney W. Grimes.El 1899b50d902SRodney W. Grimes.Sh PRIMARIES 190be2cad28SGlen BarberAll primaries which take a numeric argument allow the number to be 191be2cad28SGlen Barberpreceded by a plus sign 192be2cad28SGlen Barber.Pq Dq Li + 193be2cad28SGlen Barberor a minus sign 194be2cad28SGlen Barber.Pq Dq Li - . 195be2cad28SGlen BarberA preceding plus sign means 196be2cad28SGlen Barber.Dq more than n , 197be2cad28SGlen Barbera preceding minus sign means 198be2cad28SGlen Barber.Dq less than n 199be2cad28SGlen Barberand neither means 200be2cad28SGlen Barber.Dq exactly n . 201bfd12208SRuslan Ermilov.Bl -tag -width indent 20231d53425SCeri Davies.It Ic -Bmin Ar n 20331d53425SCeri DaviesTrue if the difference between the time of a file's inode creation 20431d53425SCeri Daviesand the time 20531d53425SCeri Davies.Nm 20631d53425SCeri Davieswas started, rounded up to the next full minute, is 20731d53425SCeri Davies.Ar n 20831d53425SCeri Daviesminutes. 20931d53425SCeri Davies.It Ic -Bnewer Ar file 21031d53425SCeri DaviesSame as 21131d53425SCeri Davies.Ic -newerBm . 21231d53425SCeri Davies.It Ic -Btime Ar n Ns Op Cm smhdw 21331d53425SCeri DaviesIf no units are specified, this primary evaluates to 21431d53425SCeri Daviestrue if the difference between the time of a file's inode creation 21531d53425SCeri Daviesand the time 21631d53425SCeri Davies.Nm 21731d53425SCeri Davieswas started, rounded up to the next full 24-hour period, is 21831d53425SCeri Davies.Ar n 21931d53425SCeri Davies24-hour periods. 22031d53425SCeri Davies.Pp 22131d53425SCeri DaviesIf units are specified, this primary evaluates to 2223b0fbd31SRuslan Ermilovtrue if the difference between the time of a file's inode creation 2233b0fbd31SRuslan Ermilovand the time 22431d53425SCeri Davies.Nm 22531d53425SCeri Davieswas started is exactly 22631d53425SCeri Davies.Ar n 22731d53425SCeri Daviesunits. 22831d53425SCeri DaviesPlease refer to the 22931d53425SCeri Davies.Ic -atime 23031d53425SCeri Daviesprimary description for information on supported time units. 23153e87059STom Rhodes.It Ic -acl 232fbccd9dbSRuslan ErmilovMay be used in conjunction with other primaries to locate 23353e87059STom Rhodesfiles with extended ACLs. 23453e87059STom RhodesSee 23553e87059STom Rhodes.Xr acl 3 23653e87059STom Rhodesfor more information. 237115b335eSEitan Adler.It Ic -amin Oo Cm - Ns | Ns Cm + Oc Ns Ar n 2383f5223f8SWolfram SchneiderTrue if the difference between the file last access time and the time 2398fe908efSRuslan Ermilov.Nm 24045fe9882SMatthew Huntwas started, rounded up to the next full minute, is 241115b335eSEitan Adlermore than 2423f5223f8SWolfram Schneider.Ar n 243115b335eSEitan Adler.Pq + Ns Ar n , 244115b335eSEitan Adlerless than 245115b335eSEitan Adler.Ar n 246115b335eSEitan Adler.Pq - Ns Ar n , 247115b335eSEitan Adleror exactly 248115b335eSEitan Adler.Ar n 249115b335eSEitan Adlerminutes ago. 250ea92232aSPoul-Henning Kamp.It Ic -anewer Ar file 251ea92232aSPoul-Henning KampSame as 252ea92232aSPoul-Henning Kamp.Ic -neweram . 253adff4fcaSRuslan Ermilov.It Ic -atime Ar n Ns Op Cm smhdw 254adff4fcaSRuslan ErmilovIf no units are specified, this primary evaluates to 255adff4fcaSRuslan Ermilovtrue if the difference between the file last access time and the time 2568fe908efSRuslan Ermilov.Nm 25754874bb6SRuslan Ermilovwas started, rounded up to the next full 24-hour period, is 2589b50d902SRodney W. Grimes.Ar n 25954874bb6SRuslan Ermilov24-hour periods. 260adff4fcaSRuslan Ermilov.Pp 261adff4fcaSRuslan ErmilovIf units are specified, this primary evaluates to 262adff4fcaSRuslan Ermilovtrue if the difference between the file last access time and the time 263adff4fcaSRuslan Ermilov.Nm 264adff4fcaSRuslan Ermilovwas started is exactly 265adff4fcaSRuslan Ermilov.Ar n 266adff4fcaSRuslan Ermilovunits. 267adff4fcaSRuslan ErmilovPossible time units are as follows: 268adff4fcaSRuslan Ermilov.Pp 269adff4fcaSRuslan Ermilov.Bl -tag -width indent -compact 270adff4fcaSRuslan Ermilov.It Cm s 271adff4fcaSRuslan Ermilovsecond 272adff4fcaSRuslan Ermilov.It Cm m 273adff4fcaSRuslan Ermilovminute (60 seconds) 274adff4fcaSRuslan Ermilov.It Cm h 275adff4fcaSRuslan Ermilovhour (60 minutes) 276adff4fcaSRuslan Ermilov.It Cm d 277adff4fcaSRuslan Ermilovday (24 hours) 278adff4fcaSRuslan Ermilov.It Cm w 279adff4fcaSRuslan Ermilovweek (7 days) 280adff4fcaSRuslan Ermilov.El 281adff4fcaSRuslan Ermilov.Pp 282adff4fcaSRuslan ErmilovAny number of units may be combined in one 283adff4fcaSRuslan Ermilov.Ic -atime 284adff4fcaSRuslan Ermilovargument, for example, 285adff4fcaSRuslan Ermilov.Dq Li "-atime -1h30m" . 286adff4fcaSRuslan ErmilovUnits are probably only useful when used in conjunction with the 287adff4fcaSRuslan Ermilov.Cm + 288adff4fcaSRuslan Ermilovor 289adff4fcaSRuslan Ermilov.Cm - 290adff4fcaSRuslan Ermilovmodifier. 291115b335eSEitan Adler.It Ic -cmin Oo Cm - Ns | Ns Cm + Oc Ns Ar n 2923f5223f8SWolfram SchneiderTrue if the difference between the time of last change of file status 2933f5223f8SWolfram Schneiderinformation and the time 2948fe908efSRuslan Ermilov.Nm 29545fe9882SMatthew Huntwas started, rounded up to the next full minute, is 296115b335eSEitan Adlermore than 2973f5223f8SWolfram Schneider.Ar n 298115b335eSEitan Adler.Pq + Ns Ar n , 299115b335eSEitan Adlerless than 300115b335eSEitan Adler.Ar n 301115b335eSEitan Adler.Pq - Ns Ar n , 302115b335eSEitan Adleror exactly 303115b335eSEitan Adler.Ar n 304115b335eSEitan Adlerminutes ago. 305ea92232aSPoul-Henning Kamp.It Ic -cnewer Ar file 306ea92232aSPoul-Henning KampSame as 307ea92232aSPoul-Henning Kamp.Ic -newercm . 308adff4fcaSRuslan Ermilov.It Ic -ctime Ar n Ns Op Cm smhdw 309adff4fcaSRuslan ErmilovIf no units are specified, this primary evaluates to 310adff4fcaSRuslan Ermilovtrue if the difference between the time of last change of file status 3119b50d902SRodney W. Grimesinformation and the time 3128fe908efSRuslan Ermilov.Nm 31354874bb6SRuslan Ermilovwas started, rounded up to the next full 24-hour period, is 3149b50d902SRodney W. Grimes.Ar n 31554874bb6SRuslan Ermilov24-hour periods. 316adff4fcaSRuslan Ermilov.Pp 317adff4fcaSRuslan ErmilovIf units are specified, this primary evaluates to 318adff4fcaSRuslan Ermilovtrue if the difference between the time of last change of file status 319adff4fcaSRuslan Ermilovinformation and the time 320adff4fcaSRuslan Ermilov.Nm 321adff4fcaSRuslan Ermilovwas started is exactly 322adff4fcaSRuslan Ermilov.Ar n 323adff4fcaSRuslan Ermilovunits. 324adff4fcaSRuslan ErmilovPlease refer to the 325adff4fcaSRuslan Ermilov.Ic -atime 326adff4fcaSRuslan Ermilovprimary description for information on supported time units. 32746b993ffSWarner Losh.It Ic -d 328a8622446SIsabell LongNon-portable, BSD-specific version of 32946b993ffSWarner Losh.Ic depth . 33046b993ffSWarner LoshGNU find implements this as a primary in mistaken emulation of 33146b993ffSWarner Losh.Fx 33281b295a1SEitan Adler.Nm . 333abacbbbfSPeter Wemm.It Ic -delete 3346df69548SBruce EvansDelete found files and/or directories. 3356df69548SBruce EvansAlways returns true. 3366df69548SBruce EvansThis executes 337abacbbbfSPeter Wemmfrom the current working directory as 338abacbbbfSPeter Wemm.Nm 3396df69548SBruce Evansrecurses down the tree. 340bfd12208SRuslan ErmilovIt will not attempt to delete a filename with a 341bfd12208SRuslan Ermilov.Dq Pa / 342bfd12208SRuslan Ermilovcharacter in its pathname relative to 343bfd12208SRuslan Ermilov.Dq Pa \&. 344bfd12208SRuslan Ermilovfor security reasons. 34554874bb6SRuslan ErmilovDepth-first traversal processing is implied by this option. 3465102783bSEitan AdlerThe 3475102783bSEitan Adler.Ic -delete 3485102783bSEitan Adlerprimary will fail to delete a directory if it is not empty. 349a05cb852SJilles TjoelkerFollowing symlinks is incompatible with this option. 35045438f9cSDag-Erling Smørgrav.Pp 35145438f9cSDag-Erling Smørgrav.Em WARNING : 35245438f9cSDag-Erling SmørgravThe 35345438f9cSDag-Erling Smørgrav.Ic -delete 35445438f9cSDag-Erling Smørgravprimary will immediately attempt to delete the current path when 35545438f9cSDag-Erling Smørgravevaluated. 35645438f9cSDag-Erling SmørgravBe mindful of its place in the expression; as a general rule, it 35745438f9cSDag-Erling Smørgravshould almost always come last. 35845438f9cSDag-Erling SmørgravIf in doubt, try running with 35945438f9cSDag-Erling Smørgrav.Ic -print 36045438f9cSDag-Erling Smørgravin place of 36145438f9cSDag-Erling Smørgrav.Ic -delete 36245438f9cSDag-Erling Smørgravfirst. 36345438f9cSDag-Erling SmørgravSee 36445438f9cSDag-Erling Smørgrav.Sx OPERATORS 36545438f9cSDag-Erling Smørgravbelow for additional information on the order of evaluation. 3669b4e871aSDavid E. O'Brien.It Ic -depth 3679b4e871aSDavid E. O'BrienAlways true; 368a8622446SIsabell Longsame as the non-portable 3699b4e871aSDavid E. O'Brien.Fl d 370eb555785SJilles Tjoelkeroption. 371eb555785SJilles TjoelkerCause 372eb555785SJilles Tjoelker.Nm 373eb555785SJilles Tjoelkerto perform a depth-first traversal, i.e., directories 374eb555785SJilles Tjoelkerare visited in post-order and all entries in a directory will be acted 375eb555785SJilles Tjoelkeron before the directory itself. 376eb555785SJilles TjoelkerBy default, 377eb555785SJilles Tjoelker.Nm 378eb555785SJilles Tjoelkervisits directories in pre-order, i.e., before their contents. 379eb555785SJilles TjoelkerNote, the default is 380eb555785SJilles Tjoelker.Em not 381eb555785SJilles Tjoelkera breadth-first traversal. 382eb555785SJilles Tjoelker.Pp 383eb555785SJilles TjoelkerThe 384eb555785SJilles Tjoelker.Ic -depth 385eb555785SJilles Tjoelkerprimary 386eb555785SJilles Tjoelkercan be useful when 387eb555785SJilles Tjoelker.Nm 388eb555785SJilles Tjoelkeris used with 389eb555785SJilles Tjoelker.Xr cpio 1 390eb555785SJilles Tjoelkerto process files that are contained in directories with unusual permissions. 391eb555785SJilles TjoelkerIt ensures that you have write permission while you are placing files in a 392eb555785SJilles Tjoelkerdirectory, then sets the directory's permissions as the last thing. 3931c832963SOliver Eikemeier.It Ic -depth Ar n 3941c832963SOliver EikemeierTrue if the depth of the file relative to the starting point of the traversal 3951c832963SOliver Eikemeieris 3961c832963SOliver Eikemeier.Ar n . 397ed1a4621SPeter Wemm.It Ic -empty 398ed1a4621SPeter WemmTrue if the current file or directory is empty. 399c93e83feSRuslan Ermilov.It Ic -exec Ar utility Oo Ar argument ... Oc Li \&; 4009b50d902SRodney W. GrimesTrue if the program named 4019b50d902SRodney W. Grimes.Ar utility 4029b50d902SRodney W. Grimesreturns a zero value as its exit status. 403bfd12208SRuslan ErmilovOptional 404bfd12208SRuslan Ermilov.Ar arguments 405bfd12208SRuslan Ermilovmay be passed to the utility. 406bfd12208SRuslan ErmilovThe expression must be terminated by a semicolon 407bfd12208SRuslan Ermilov.Pq Dq Li \&; . 4086a2b59f8SJens SchweikhardtIf you invoke 4096a2b59f8SJens Schweikhardt.Nm 4106a2b59f8SJens Schweikhardtfrom a shell you may need to quote the semicolon if the shell would 4116a2b59f8SJens Schweikhardtotherwise treat it as a control operator. 412bfd12208SRuslan ErmilovIf the string 413bfd12208SRuslan Ermilov.Dq Li {} 414bfd12208SRuslan Ermilovappears anywhere in the utility name or the 4159b50d902SRodney W. Grimesarguments it is replaced by the pathname of the current file. 4169b50d902SRodney W. Grimes.Ar Utility 4179b50d902SRodney W. Grimeswill be executed from the directory from which 4188fe908efSRuslan Ermilov.Nm 4199b50d902SRodney W. Grimeswas executed. 42008274979SYaroslav Tykhiy.Ar Utility 42108274979SYaroslav Tykhiyand 42208274979SYaroslav Tykhiy.Ar arguments 42308274979SYaroslav Tykhiyare not subject to the further expansion of shell patterns 42408274979SYaroslav Tykhiyand constructs. 425c93e83feSRuslan Ermilov.It Ic -exec Ar utility Oo Ar argument ... Oc Li {} + 4265e25d888STim J. RobbinsSame as 4275e25d888STim J. Robbins.Ic -exec , 4285e25d888STim J. Robbinsexcept that 4295e25d888STim J. Robbins.Dq Li {} 4305e25d888STim J. Robbinsis replaced with as many pathnames as possible for each invocation of 4315e25d888STim J. Robbins.Ar utility . 4325e25d888STim J. RobbinsThis behaviour is similar to that of 4335e25d888STim J. Robbins.Xr xargs 1 . 4347a79617cSJilles TjoelkerThe primary always returns true; 4357a79617cSJilles Tjoelkerif at least one invocation of 4367a79617cSJilles Tjoelker.Ar utility 4377a79617cSJilles Tjoelkerreturns a non-zero exit status, 4387a79617cSJilles Tjoelker.Nm 4397a79617cSJilles Tjoelkerwill return a non-zero exit status. 440c93e83feSRuslan Ermilov.It Ic -execdir Ar utility Oo Ar argument ... Oc Li \&; 441127d7563SWarner LoshThe 442bfd12208SRuslan Ermilov.Ic -execdir 443127d7563SWarner Loshprimary is identical to the 444127d7563SWarner Losh.Ic -exec 445127d7563SWarner Loshprimary with the exception that 446bfd12208SRuslan Ermilov.Ar utility 447127d7563SWarner Loshwill be executed from the directory that holds 4486df69548SBruce Evansthe current file. 4496df69548SBruce EvansThe filename substituted for 450bfd12208SRuslan Ermilovthe string 451bfd12208SRuslan Ermilov.Dq Li {} 452bfd12208SRuslan Ermilovis not qualified. 45346b993ffSWarner Losh.It Ic -execdir Ar utility Oo Ar argument ... Oc Li {} + 45446b993ffSWarner LoshSame as 45546b993ffSWarner Losh.Ic -execdir , 45646b993ffSWarner Loshexcept that 45746b993ffSWarner Losh.Dq Li {} 45846b993ffSWarner Loshis replaced with as many pathnames as possible for each invocation of 45946b993ffSWarner Losh.Ar utility . 46046b993ffSWarner LoshThis behaviour is similar to that of 46146b993ffSWarner Losh.Xr xargs 1 . 4627a79617cSJilles TjoelkerThe primary always returns true; 4637a79617cSJilles Tjoelkerif at least one invocation of 4647a79617cSJilles Tjoelker.Ar utility 4657a79617cSJilles Tjoelkerreturns a non-zero exit status, 4667a79617cSJilles Tjoelker.Nm 4677a79617cSJilles Tjoelkerwill return a non-zero exit status. 4687fd5ee41SRuslan Ermilov.It Ic -flags Oo Cm - Ns | Ns Cm + Oc Ns Ar flags , Ns Ar notflags 4697fd5ee41SRuslan ErmilovThe flags are specified using symbolic names (see 470208691fcSRuslan Ermilov.Xr chflags 1 ) . 4717fd5ee41SRuslan ErmilovThose with the 4727fd5ee41SRuslan Ermilov.Qq Li no 4737fd5ee41SRuslan Ermilovprefix (except 4747fd5ee41SRuslan Ermilov.Qq Li nodump ) 4757fd5ee41SRuslan Ermilovare said to be 4767fd5ee41SRuslan Ermilov.Ar notflags . 4777fd5ee41SRuslan ErmilovFlags in 4787fd5ee41SRuslan Ermilov.Ar flags 4797fd5ee41SRuslan Ermilovare checked to be set, and flags in 4807fd5ee41SRuslan Ermilov.Ar notflags 4817fd5ee41SRuslan Ermilovare checked to be not set. 482208691fcSRuslan ErmilovNote that this is different from 483208691fcSRuslan Ermilov.Ic -perm , 4847fd5ee41SRuslan Ermilovwhich only allows the user to specify mode bits that are set. 4857fd5ee41SRuslan Ermilov.Pp 4867fd5ee41SRuslan ErmilovIf flags are preceded by a dash 4877fd5ee41SRuslan Ermilov.Pq Dq Li - , 4887fd5ee41SRuslan Ermilovthis primary evaluates to true 4897fd5ee41SRuslan Ermilovif at least all of the bits in 4907fd5ee41SRuslan Ermilov.Ar flags 4917fd5ee41SRuslan Ermilovand none of the bits in 4927fd5ee41SRuslan Ermilov.Ar notflags 4937fd5ee41SRuslan Ermilovare set in the file's flags bits. 4947fd5ee41SRuslan ErmilovIf flags are preceded by a plus 4957fd5ee41SRuslan Ermilov.Pq Dq Li + , 4967fd5ee41SRuslan Ermilovthis primary evaluates to true 4977fd5ee41SRuslan Ermilovif any of the bits in 4987fd5ee41SRuslan Ermilov.Ar flags 4997fd5ee41SRuslan Ermilovis set in the file's flags bits, 5007fd5ee41SRuslan Ermilovor any of the bits in 5017fd5ee41SRuslan Ermilov.Ar notflags 5027fd5ee41SRuslan Ermilovis not set in the file's flags bits. 5037fd5ee41SRuslan ErmilovOtherwise, 5047fd5ee41SRuslan Ermilovthis primary evaluates to true 5057fd5ee41SRuslan Ermilovif the bits in 5067fd5ee41SRuslan Ermilov.Ar flags 5077fd5ee41SRuslan Ermilovexactly match the file's flags bits, 5087fd5ee41SRuslan Ermilovand none of the 5097fd5ee41SRuslan Ermilov.Ar flags 5107fd5ee41SRuslan Ermilovbits match those of 5117fd5ee41SRuslan Ermilov.Ar notflags . 5129b50d902SRodney W. Grimes.It Ic -fstype Ar type 5139b50d902SRodney W. GrimesTrue if the file is contained in a file system of type 5149b50d902SRodney W. Grimes.Ar type . 515841484cdSPeter WemmThe 516d740b7c7SPawel Jakub Dawidek.Xr lsvfs 1 517841484cdSPeter Wemmcommand can be used to find out the types of file systems 518d740b7c7SPawel Jakub Dawidekthat are available on the system. 519bfd12208SRuslan ErmilovIn addition, there are two pseudo-types, 520bfd12208SRuslan Ermilov.Dq Li local 521bfd12208SRuslan Ermilovand 522bfd12208SRuslan Ermilov.Dq Li rdonly . 5239b50d902SRodney W. GrimesThe former matches any file system physically mounted on the system where 5249b50d902SRodney W. Grimesthe 5258fe908efSRuslan Ermilov.Nm 5269b50d902SRodney W. Grimesis being executed and the latter matches any file system which is 5279b50d902SRodney W. Grimesmounted read-only. 52846b993ffSWarner Losh.It Ic -gid Ar gname 52946b993ffSWarner LoshThe same thing as 53093e0e298SMateusz Piotrowski.Ic -group Ar gname 53146b993ffSWarner Loshfor compatibility with GNU find. 53246b993ffSWarner LoshGNU find imposes a restriction that 53346b993ffSWarner Losh.Ar gname 53446b993ffSWarner Loshis numeric, while 53581b295a1SEitan Adler.Nm 53646b993ffSWarner Loshdoes not. 5379b50d902SRodney W. Grimes.It Ic -group Ar gname 5389b50d902SRodney W. GrimesTrue if the file belongs to the group 5399b50d902SRodney W. Grimes.Ar gname . 5409b50d902SRodney W. GrimesIf 5419b50d902SRodney W. Grimes.Ar gname 5429b50d902SRodney W. Grimesis numeric and there is no such group name, then 5439b50d902SRodney W. Grimes.Ar gname 544bfd12208SRuslan Ermilovis treated as a group ID. 54546b993ffSWarner Losh.It Ic -ignore_readdir_race 54640072dc2SJilles TjoelkerIgnore errors because a file or a directory is deleted 54740072dc2SJilles Tjoelkerafter reading the name from a directory. 54840072dc2SJilles TjoelkerThis option does not affect errors occurring on starting points. 54946b993ffSWarner Losh.It Ic -ilname Ar pattern 55046b993ffSWarner LoshLike 55146b993ffSWarner Losh.Ic -lname , 55246b993ffSWarner Loshbut the match is case insensitive. 553a66a6a2aSWarner LoshThis is a GNU find extension. 554208691fcSRuslan Ermilov.It Ic -iname Ar pattern 555208691fcSRuslan ErmilovLike 556208691fcSRuslan Ermilov.Ic -name , 557208691fcSRuslan Ermilovbut the match is case insensitive. 5589b50d902SRodney W. Grimes.It Ic -inum Ar n 5599b50d902SRodney W. GrimesTrue if the file has inode number 5609b50d902SRodney W. Grimes.Ar n . 561208691fcSRuslan Ermilov.It Ic -ipath Ar pattern 562208691fcSRuslan ErmilovLike 563208691fcSRuslan Ermilov.Ic -path , 564208691fcSRuslan Ermilovbut the match is case insensitive. 565208691fcSRuslan Ermilov.It Ic -iregex Ar pattern 566208691fcSRuslan ErmilovLike 567208691fcSRuslan Ermilov.Ic -regex , 568208691fcSRuslan Ermilovbut the match is case insensitive. 56946b993ffSWarner Losh.It Ic -iwholename Ar pattern 57046b993ffSWarner LoshThe same thing as 57146b993ffSWarner Losh.Ic -ipath , 57246b993ffSWarner Loshfor GNU find compatibility. 5739b50d902SRodney W. Grimes.It Ic -links Ar n 5749b50d902SRodney W. GrimesTrue if the file has 5759b50d902SRodney W. Grimes.Ar n 5769b50d902SRodney W. Grimeslinks. 57746b993ffSWarner Losh.It Ic -lname Ar pattern 57846b993ffSWarner LoshLike 57946b993ffSWarner Losh.Ic -name , 580a66a6a2aSWarner Loshbut the contents of the symbolic link are matched instead of the file 581a66a6a2aSWarner Loshname. 582e810bef7SJilles TjoelkerNote that this only matches broken symbolic links 583e810bef7SJilles Tjoelkerif symbolic links are being followed. 584a66a6a2aSWarner LoshThis is a GNU find extension. 5859b50d902SRodney W. Grimes.It Ic -ls 5869b50d902SRodney W. GrimesThis primary always evaluates to true. 5879b50d902SRodney W. GrimesThe following information for the current file is written to standard output: 58854874bb6SRuslan Ermilovits inode number, size in 512-byte blocks, file permissions, number of hard 5899b50d902SRodney W. Grimeslinks, owner, group, size in bytes, last modification time, and pathname. 5909f365aa1SEd SchoutenIf the file is a block or character special file, the device number 5919b50d902SRodney W. Grimeswill be displayed instead of the size in bytes. 59254874bb6SRuslan ErmilovIf the file is a symbolic link, the pathname of the linked-to file will be 593bfd12208SRuslan Ermilovdisplayed preceded by 594bfd12208SRuslan Ermilov.Dq Li -> . 595bfd12208SRuslan ErmilovThe format is identical to that produced by 596bfd12208SRuslan Ermilov.Bk -words 597fbccd9dbSRuslan Ermilov.Dq Nm ls Fl dgils . 598bfd12208SRuslan Ermilov.Ek 599c76bc8f3SOllivier Robert.It Ic -maxdepth Ar n 6009c61111dSOliver EikemeierAlways true; descend at most 6019c61111dSOliver Eikemeier.Ar n 6029c61111dSOliver Eikemeierdirectory levels below the command line arguments. 603d79829afSOliver EikemeierIf any 604d79829afSOliver Eikemeier.Ic -maxdepth 605d79829afSOliver Eikemeierprimary is specified, it applies to the entire expression even if it would 606d79829afSOliver Eikemeiernot normally be evaluated. 607fbccd9dbSRuslan Ermilov.Dq Ic -maxdepth Li 0 608d79829afSOliver Eikemeierlimits the whole search to the command line arguments. 609c76bc8f3SOllivier Robert.It Ic -mindepth Ar n 6109c61111dSOliver EikemeierAlways true; do not apply any tests or actions at levels less than 6119c61111dSOliver Eikemeier.Ar n . 612d79829afSOliver EikemeierIf any 613d79829afSOliver Eikemeier.Ic -mindepth 614d79829afSOliver Eikemeierprimary is specified, it applies to the entire expression even if it would 615d79829afSOliver Eikemeiernot normally be evaluated. 616fbccd9dbSRuslan Ermilov.Dq Ic -mindepth Li 1 617d79829afSOliver Eikemeierprocesses all but the command line arguments. 618115b335eSEitan Adler.It Ic -mmin Oo Cm - Ns | Ns Cm + Oc Ns Ar n 6193f5223f8SWolfram SchneiderTrue if the difference between the file last modification time and the time 6208fe908efSRuslan Ermilov.Nm 62145fe9882SMatthew Huntwas started, rounded up to the next full minute, is 62216ce602cSSevan Janiyanmore than 6233f5223f8SWolfram Schneider.Ar n 624115b335eSEitan Adler.Pq + Ns Ar n , 625115b335eSEitan Adlerless than 626115b335eSEitan Adler.Ar n 627115b335eSEitan Adler.Pq - Ns Ar n , 628115b335eSEitan Adleror exactly 629115b335eSEitan Adler.Ar n 630115b335eSEitan Adlerminutes ago. 631208691fcSRuslan Ermilov.It Ic -mnewer Ar file 632208691fcSRuslan ErmilovSame as 633208691fcSRuslan Ermilov.Ic -newer . 63446b993ffSWarner Losh.It Ic -mount 63546b993ffSWarner LoshThe same thing as 63646b993ffSWarner Losh.Ic -xdev , 63746b993ffSWarner Loshfor GNU find compatibility. 638adff4fcaSRuslan Ermilov.It Ic -mtime Ar n Ns Op Cm smhdw 639adff4fcaSRuslan ErmilovIf no units are specified, this primary evaluates to 640adff4fcaSRuslan Ermilovtrue if the difference between the file last modification time and the time 6418fe908efSRuslan Ermilov.Nm 64254874bb6SRuslan Ermilovwas started, rounded up to the next full 24-hour period, is 6439b50d902SRodney W. Grimes.Ar n 64454874bb6SRuslan Ermilov24-hour periods. 645adff4fcaSRuslan Ermilov.Pp 646adff4fcaSRuslan ErmilovIf units are specified, this primary evaluates to 647adff4fcaSRuslan Ermilovtrue if the difference between the file last modification time and the time 648adff4fcaSRuslan Ermilov.Nm 649adff4fcaSRuslan Ermilovwas started is exactly 650adff4fcaSRuslan Ermilov.Ar n 651adff4fcaSRuslan Ermilovunits. 652adff4fcaSRuslan ErmilovPlease refer to the 653adff4fcaSRuslan Ermilov.Ic -atime 654adff4fcaSRuslan Ermilovprimary description for information on supported time units. 6559b50d902SRodney W. Grimes.It Ic -name Ar pattern 6569b50d902SRodney W. GrimesTrue if the last component of the pathname being examined matches 6579b50d902SRodney W. Grimes.Ar pattern . 658bfd12208SRuslan ErmilovSpecial shell pattern matching characters 659bfd12208SRuslan Ermilov.Dq ( Li \&[ , 660bfd12208SRuslan Ermilov.Dq Li \&] , 661bfd12208SRuslan Ermilov.Dq Li * , 662bfd12208SRuslan Ermilovand 663bfd12208SRuslan Ermilov.Dq Li \&? ) 6649b50d902SRodney W. Grimesmay be used as part of 6659b50d902SRodney W. Grimes.Ar pattern . 6669b50d902SRodney W. GrimesThese characters may be matched explicitly by escaping them with a 667bfd12208SRuslan Ermilovbackslash 668bfd12208SRuslan Ermilov.Pq Dq Li \e . 6699b50d902SRodney W. Grimes.It Ic -newer Ar file 6709b50d902SRodney W. GrimesTrue if the current file has a more recent last modification time than 6719b50d902SRodney W. Grimes.Ar file . 672bfd12208SRuslan Ermilov.It Ic -newer Ns Ar X Ns Ar Y Ar file 673bfd12208SRuslan ErmilovTrue if the current file has a more recent last access time 674fbccd9dbSRuslan Ermilov.Pq Ar X Ns = Ns Cm a , 67531d53425SCeri Daviesinode creation time 676fbccd9dbSRuslan Ermilov.Pq Ar X Ns = Ns Cm B , 677bfd12208SRuslan Ermilovchange time 678fbccd9dbSRuslan Ermilov.Pq Ar X Ns = Ns Cm c , 679bfd12208SRuslan Ermilovor modification time 680fbccd9dbSRuslan Ermilov.Pq Ar X Ns = Ns Cm m 681bfd12208SRuslan Ermilovthan the last access time 682fbccd9dbSRuslan Ermilov.Pq Ar Y Ns = Ns Cm a , 68331d53425SCeri Daviesinode creation time 684fbccd9dbSRuslan Ermilov.Pq Ar Y Ns = Ns Cm B , 685bfd12208SRuslan Ermilovchange time 686fbccd9dbSRuslan Ermilov.Pq Ar Y Ns = Ns Cm c , 687bfd12208SRuslan Ermilovor modification time 688fbccd9dbSRuslan Ermilov.Pq Ar Y Ns = Ns Cm m 689bfd12208SRuslan Ermilovof 690ea92232aSPoul-Henning Kamp.Ar file . 691ea92232aSPoul-Henning KampIn addition, if 692bfd12208SRuslan Ermilov.Ar Y Ns = Ns Cm t , 693ea92232aSPoul-Henning Kampthen 694ea92232aSPoul-Henning Kamp.Ar file 695ea92232aSPoul-Henning Kampis instead interpreted as a direct date specification of the form 69652dbe1a0SFelix Johnsonunderstood by ISO8601 or RFC822. 697ea92232aSPoul-Henning KampNote that 698ea92232aSPoul-Henning Kamp.Ic -newermm 699ea92232aSPoul-Henning Kampis equivalent to 700ea92232aSPoul-Henning Kamp.Ic -newer . 7019b50d902SRodney W. Grimes.It Ic -nogroup 7029b50d902SRodney W. GrimesTrue if the file belongs to an unknown group. 70346b993ffSWarner Losh.It Ic -noignore_readdir_race 70440072dc2SJilles TjoelkerTurn off the effect of 70540072dc2SJilles Tjoelker.Ic -ignore_readdir_race . 70640072dc2SJilles TjoelkerThis is default behaviour. 70746b993ffSWarner Losh.It Ic -noleaf 70846b993ffSWarner LoshThis option is for GNU find compatibility. 70946b993ffSWarner LoshIn GNU find it disables an optimization not relevant to 71081b295a1SEitan Adler.Nm , 71146b993ffSWarner Loshso it is ignored. 712208691fcSRuslan Ermilov.It Ic -nouser 713208691fcSRuslan ErmilovTrue if the file belongs to an unknown user. 714c93e83feSRuslan Ermilov.It Ic -ok Ar utility Oo Ar argument ... Oc Li \&; 715208691fcSRuslan ErmilovThe 716208691fcSRuslan Ermilov.Ic -ok 717208691fcSRuslan Ermilovprimary is identical to the 718208691fcSRuslan Ermilov.Ic -exec 719208691fcSRuslan Ermilovprimary with the exception that 720208691fcSRuslan Ermilov.Nm 721208691fcSRuslan Ermilovrequests user affirmation for the execution of the 722208691fcSRuslan Ermilov.Ar utility 723208691fcSRuslan Ermilovby printing 724208691fcSRuslan Ermilova message to the terminal and reading a response. 72539c59153SRuslan ErmilovIf the response is not affirmative 72639c59153SRuslan Ermilov.Ql ( y 727ef6c7764STim J. Robbinsin the 728ef6c7764STim J. Robbins.Dq Li POSIX 729ef6c7764STim J. Robbinslocale), 730208691fcSRuslan Ermilovthe command is not executed and the 731208691fcSRuslan Ermilovvalue of the 732208691fcSRuslan Ermilov.Ic -ok 733208691fcSRuslan Ermilovexpression is false. 734c93e83feSRuslan Ermilov.It Ic -okdir Ar utility Oo Ar argument ... Oc Li \&; 735208691fcSRuslan ErmilovThe 736208691fcSRuslan Ermilov.Ic -okdir 737208691fcSRuslan Ermilovprimary is identical to the 738208691fcSRuslan Ermilov.Ic -execdir 739208691fcSRuslan Ermilovprimary with the same exception as described for the 740208691fcSRuslan Ermilov.Ic -ok 741208691fcSRuslan Ermilovprimary. 7429b50d902SRodney W. Grimes.It Ic -path Ar pattern 7439b50d902SRodney W. GrimesTrue if the pathname being examined matches 7449b50d902SRodney W. Grimes.Ar pattern . 745bfd12208SRuslan ErmilovSpecial shell pattern matching characters 746bfd12208SRuslan Ermilov.Dq ( Li \&[ , 747bfd12208SRuslan Ermilov.Dq Li \&] , 748bfd12208SRuslan Ermilov.Dq Li * , 749bfd12208SRuslan Ermilovand 750bfd12208SRuslan Ermilov.Dq Li \&? ) 7519b50d902SRodney W. Grimesmay be used as part of 7529b50d902SRodney W. Grimes.Ar pattern . 7539b50d902SRodney W. GrimesThese characters may be matched explicitly by escaping them with a 754bfd12208SRuslan Ermilovbackslash 755bfd12208SRuslan Ermilov.Pq Dq Li \e . 756bfd12208SRuslan ErmilovSlashes 757bfd12208SRuslan Ermilov.Pq Dq Li / 758bfd12208SRuslan Ermilovare treated as normal characters and do not have to be 7599b50d902SRodney W. Grimesmatched explicitly. 760*2a121b97SRicardo Branco.It Ic -perm Oo Cm - Ns | Ns Cm + Ns | Ns Cm / Oc Ns Ar mode 7619b50d902SRodney W. GrimesThe 7629b50d902SRodney W. Grimes.Ar mode 7639b50d902SRodney W. Grimesmay be either symbolic (see 7649b50d902SRodney W. Grimes.Xr chmod 1 ) 7659b50d902SRodney W. Grimesor an octal number. 7667fd5ee41SRuslan ErmilovIf the 7677fd5ee41SRuslan Ermilov.Ar mode 7687fd5ee41SRuslan Ermilovis symbolic, a starting value of zero is assumed and the 7697fd5ee41SRuslan Ermilov.Ar mode 7707fd5ee41SRuslan Ermilovsets or clears permissions without regard to the process' file mode 7719b50d902SRodney W. Grimescreation mask. 7727fd5ee41SRuslan ErmilovIf the 7737fd5ee41SRuslan Ermilov.Ar mode 7747fd5ee41SRuslan Ermilovis octal, only bits 07777 775bfd12208SRuslan Ermilov.Pq Dv S_ISUID | S_ISGID | S_ISTXT | S_IRWXU | S_IRWXG | S_IRWXO 7769b50d902SRodney W. Grimesof the file's mode bits participate 7779b50d902SRodney W. Grimesin the comparison. 7787fd5ee41SRuslan ErmilovIf the 7797fd5ee41SRuslan Ermilov.Ar mode 7807fd5ee41SRuslan Ermilovis preceded by a dash 781bfd12208SRuslan Ermilov.Pq Dq Li - , 7829b88faecSRuslan Ermilovthis primary evaluates to true 7837fd5ee41SRuslan Ermilovif at least all of the bits in the 7847fd5ee41SRuslan Ermilov.Ar mode 7857fd5ee41SRuslan Ermilovare set in the file's mode bits. 7867fd5ee41SRuslan ErmilovIf the 7877fd5ee41SRuslan Ermilov.Ar mode 7887fd5ee41SRuslan Ermilovis preceded by a plus 789*2a121b97SRicardo Branco.Pq Dq Li + 7909b88faecSRuslan Ermilovthis primary evaluates to true 7917fd5ee41SRuslan Ermilovif any of the bits in the 7927fd5ee41SRuslan Ermilov.Ar mode 7937fd5ee41SRuslan Ermilovare set in the file's mode bits. 794*2a121b97SRicardo BrancoA slash 795*2a121b97SRicardo Branco.Pq Dq Li / 796*2a121b97SRicardo Brancois also accepted with the same meaning as plus for compatibility with GNU find. 7979d2796c3SOllivier RobertOtherwise, this primary evaluates to true if 7987fd5ee41SRuslan Ermilovthe bits in the 7997fd5ee41SRuslan Ermilov.Ar mode 8007fd5ee41SRuslan Ermilovexactly match the file's mode bits. 801bfd12208SRuslan ErmilovNote, the first character of a symbolic mode may not be a dash 802bfd12208SRuslan Ermilov.Pq Dq Li - . 8039b50d902SRodney W. Grimes.It Ic -print 8049b50d902SRodney W. GrimesThis primary always evaluates to true. 8059b50d902SRodney W. GrimesIt prints the pathname of the current file to standard output. 806841484cdSPeter WemmIf none of 807bfd12208SRuslan Ermilov.Ic -exec , -ls , -print0 , 8089b50d902SRodney W. Grimesor 809bfd12208SRuslan Ermilov.Ic -ok 810841484cdSPeter Wemmis specified, the given expression shall be effectively replaced by 811bfd12208SRuslan Ermilov.Cm \&( Ar "given expression" Cm \&) Ic -print . 8127cd23434SGarrett Wollman.It Ic -print0 8137cd23434SGarrett WollmanThis primary always evaluates to true. 814fbe0d04aSMasafumi Max NAKANEIt prints the pathname of the current file to standard output, followed by an 81593b8510cSGordon BerglingASCII 816cb29445aSRuslan Ermilov.Dv NUL 8177cd23434SGarrett Wollmancharacter (character code 0). 8189b50d902SRodney W. Grimes.It Ic -prune 8199b50d902SRodney W. GrimesThis primary always evaluates to true. 8209b50d902SRodney W. GrimesIt causes 8218fe908efSRuslan Ermilov.Nm 8229b50d902SRodney W. Grimesto not descend into the current file. 8239b50d902SRodney W. GrimesNote, the 8249b50d902SRodney W. Grimes.Ic -prune 8259b50d902SRodney W. Grimesprimary has no effect if the 8269b50d902SRodney W. Grimes.Fl d 8279b50d902SRodney W. Grimesoption was specified. 8289168a75aSDag-Erling Smørgrav.It Ic -quit 8299168a75aSDag-Erling SmørgravCauses 8309168a75aSDag-Erling Smørgrav.Nm 831b547523eSJilles Tjoelkerto terminate immediately. 832208691fcSRuslan Ermilov.It Ic -regex Ar pattern 833208691fcSRuslan ErmilovTrue if the whole path of the file matches 834208691fcSRuslan Ermilov.Ar pattern 835208691fcSRuslan Ermilovusing regular expression. 836208691fcSRuslan ErmilovTo match a file named 837208691fcSRuslan Ermilov.Dq Pa ./foo/xyzzy , 838208691fcSRuslan Ermilovyou can use the regular expression 839208691fcSRuslan Ermilov.Dq Li ".*/[xyz]*" 840208691fcSRuslan Ermilovor 841208691fcSRuslan Ermilov.Dq Li ".*/foo/.*" , 842208691fcSRuslan Ermilovbut not 843208691fcSRuslan Ermilov.Dq Li xyzzy 844208691fcSRuslan Ermilovor 845208691fcSRuslan Ermilov.Dq Li /foo/ . 84646b993ffSWarner Losh.It Ic -samefile Ar name 84746b993ffSWarner LoshTrue if the file is a hard link to 84846b993ffSWarner Losh.Ar name . 84946b993ffSWarner LoshIf the command option 85046b993ffSWarner Losh.Ic -L 85146b993ffSWarner Loshis specified, it is also true if the file is a symbolic link and 85246b993ffSWarner Loshpoints to 85346b993ffSWarner Losh.Ar name . 8545a890aacSKirill Ponomarev.It Ic -size Ar n Ns Op Cm ckMGTP 85554874bb6SRuslan ErmilovTrue if the file's size, rounded up, in 512-byte blocks is 8569b50d902SRodney W. Grimes.Ar n . 8579b50d902SRodney W. GrimesIf 8589b50d902SRodney W. Grimes.Ar n 859bfd12208SRuslan Ermilovis followed by a 860bfd12208SRuslan Ermilov.Cm c , 861bfd12208SRuslan Ermilovthen the primary is true if the 8629b50d902SRodney W. Grimesfile's size is 8639b50d902SRodney W. Grimes.Ar n 864bfd12208SRuslan Ermilovbytes (characters). 8655a890aacSKirill PonomarevSimilarly if 8665a890aacSKirill Ponomarev.Ar n 8675a890aacSKirill Ponomarevis followed by a scale indicator then the file's size is compared to 8685a890aacSKirill Ponomarev.Ar n 8695a890aacSKirill Ponomarevscaled as: 8705a890aacSKirill Ponomarev.Pp 8715a890aacSKirill Ponomarev.Bl -tag -width indent -compact 8725a890aacSKirill Ponomarev.It Cm k 8735a890aacSKirill Ponomarevkilobytes (1024 bytes) 8745a890aacSKirill Ponomarev.It Cm M 8755a890aacSKirill Ponomarevmegabytes (1024 kilobytes) 8765a890aacSKirill Ponomarev.It Cm G 8775a890aacSKirill Ponomarevgigabytes (1024 megabytes) 8785a890aacSKirill Ponomarev.It Cm T 8795a890aacSKirill Ponomarevterabytes (1024 gigabytes) 8805a890aacSKirill Ponomarev.It Cm P 8815a890aacSKirill Ponomarevpetabytes (1024 terabytes) 8825a890aacSKirill Ponomarev.El 8839ed0c92cSDavid Malone.It Ic -sparse 8849ed0c92cSDavid MaloneTrue if the current file is sparse, 8859ed0c92cSDavid Malonei.e. has fewer blocks allocated than expected based on its size in bytes. 8869ed0c92cSDavid MaloneThis might also match files that have been compressed by the filesystem. 8879b50d902SRodney W. Grimes.It Ic -type Ar t 8889b50d902SRodney W. GrimesTrue if the file is of the specified type. 8899b50d902SRodney W. GrimesPossible file types are as follows: 8909b50d902SRodney W. Grimes.Pp 891bfd12208SRuslan Ermilov.Bl -tag -width indent -compact 8929b50d902SRodney W. Grimes.It Cm b 8939b50d902SRodney W. Grimesblock special 8949b50d902SRodney W. Grimes.It Cm c 8959b50d902SRodney W. Grimescharacter special 8969b50d902SRodney W. Grimes.It Cm d 8979b50d902SRodney W. Grimesdirectory 8989b50d902SRodney W. Grimes.It Cm f 8999b50d902SRodney W. Grimesregular file 9009b50d902SRodney W. Grimes.It Cm l 9019b50d902SRodney W. Grimessymbolic link 9029b50d902SRodney W. Grimes.It Cm p 9039b50d902SRodney W. GrimesFIFO 9049b50d902SRodney W. Grimes.It Cm s 9059b50d902SRodney W. Grimessocket 9069b50d902SRodney W. Grimes.El 90746b993ffSWarner Losh.It Ic -uid Ar uname 90846b993ffSWarner LoshThe same thing as 90946b993ffSWarner Losh.Ar -user Ar uname 91046b993ffSWarner Loshfor compatibility with GNU find. 91146b993ffSWarner LoshGNU find imposes a restriction that 91246b993ffSWarner Losh.Ar uname 91346b993ffSWarner Loshis numeric, while 91481b295a1SEitan Adler.Nm 91546b993ffSWarner Loshdoes not. 9169b50d902SRodney W. Grimes.It Ic -user Ar uname 9179b50d902SRodney W. GrimesTrue if the file belongs to the user 9189b50d902SRodney W. Grimes.Ar uname . 9199b50d902SRodney W. GrimesIf 9209b50d902SRodney W. Grimes.Ar uname 9219b50d902SRodney W. Grimesis numeric and there is no such user name, then 9229b50d902SRodney W. Grimes.Ar uname 923bfd12208SRuslan Ermilovis treated as a user ID. 92446b993ffSWarner Losh.It Ic -wholename Ar pattern 92546b993ffSWarner LoshThe same thing as 92646b993ffSWarner Losh.Ic -path , 92746b993ffSWarner Loshfor GNU find compatibility. 9289b50d902SRodney W. Grimes.El 9299b50d902SRodney W. Grimes.Sh OPERATORS 9309b50d902SRodney W. GrimesThe primaries may be combined using the following operators. 9319b50d902SRodney W. GrimesThe operators are listed in order of decreasing precedence. 932bfd12208SRuslan Ermilov.Pp 933fbccd9dbSRuslan Ermilov.Bl -tag -width indent -compact 9340c101fb2SJoseph Koshy.It Cm \&( Ar expression Cm \&) 9359b50d902SRodney W. GrimesThis evaluates to true if the parenthesized expression evaluates to 9369b50d902SRodney W. Grimestrue. 9379b50d902SRodney W. Grimes.Pp 9380c101fb2SJoseph Koshy.It Cm \&! Ar expression 9394a0193d3SJuli Mallett.It Cm -not Ar expression 9409b50d902SRodney W. GrimesThis is the unary 9419b50d902SRodney W. Grimes.Tn NOT 9429b50d902SRodney W. Grimesoperator. 9439b50d902SRodney W. GrimesIt evaluates to true if the expression is false. 9449b50d902SRodney W. Grimes.Pp 94546b993ffSWarner Losh.It Cm -false 94646b993ffSWarner LoshAlways false. 94746b993ffSWarner Losh.It Cm -true 94846b993ffSWarner LoshAlways true. 94946b993ffSWarner Losh.Pp 9509b50d902SRodney W. Grimes.It Ar expression Cm -and Ar expression 9519b50d902SRodney W. Grimes.It Ar expression expression 9529b50d902SRodney W. GrimesThe 9539b50d902SRodney W. Grimes.Cm -and 9549b50d902SRodney W. Grimesoperator is the logical 9559b50d902SRodney W. Grimes.Tn AND 9569b50d902SRodney W. Grimesoperator. 9579b50d902SRodney W. GrimesAs it is implied by the juxtaposition of two expressions it does not 9589b50d902SRodney W. Grimeshave to be specified. 9599b50d902SRodney W. GrimesThe expression evaluates to true if both expressions are true. 9609b50d902SRodney W. GrimesThe second expression is not evaluated if the first expression is false. 9619b50d902SRodney W. Grimes.Pp 9629b50d902SRodney W. Grimes.It Ar expression Cm -or Ar expression 9639b50d902SRodney W. GrimesThe 9649b50d902SRodney W. Grimes.Cm -or 9659b50d902SRodney W. Grimesoperator is the logical 9669b50d902SRodney W. Grimes.Tn OR 9679b50d902SRodney W. Grimesoperator. 9689b50d902SRodney W. GrimesThe expression evaluates to true if either the first or the second expression 9699b50d902SRodney W. Grimesis true. 9709b50d902SRodney W. GrimesThe second expression is not evaluated if the first expression is true. 9719b50d902SRodney W. Grimes.El 9729b50d902SRodney W. Grimes.Pp 9739b50d902SRodney W. GrimesAll operands and primaries must be separate arguments to 9748fe908efSRuslan Ermilov.Nm . 9759b50d902SRodney W. GrimesPrimaries which themselves take arguments expect each argument 9769b50d902SRodney W. Grimesto be a separate argument to 9778fe908efSRuslan Ermilov.Nm . 978ef6c7764STim J. Robbins.Sh ENVIRONMENT 979ef6c7764STim J. RobbinsThe 980ef6c7764STim J. Robbins.Ev LANG , LC_ALL , LC_COLLATE , LC_CTYPE , LC_MESSAGES 981ef6c7764STim J. Robbinsand 982ef6c7764STim J. Robbins.Ev LC_TIME 983ef6c7764STim J. Robbinsenvironment variables affect the execution of the 984ef6c7764STim J. Robbins.Nm 985ef6c7764STim J. Robbinsutility as described in 986ef6c7764STim J. Robbins.Xr environ 7 . 9879b50d902SRodney W. Grimes.Sh EXAMPLES 9889b50d902SRodney W. GrimesThe following examples are shown as given to the shell: 989bfd12208SRuslan Ermilov.Bl -tag -width indent 9909b50d902SRodney W. Grimes.It Li "find / \e! -name \*q*.c\*q -print" 991bfd12208SRuslan ErmilovPrint out a list of all the files whose names do not end in 992bfd12208SRuslan Ermilov.Pa .c . 9939b50d902SRodney W. Grimes.It Li "find / -newer ttt -user wnj -print" 994bfd12208SRuslan ErmilovPrint out a list of all the files owned by user 995bfd12208SRuslan Ermilov.Dq wnj 996bfd12208SRuslan Ermilovthat are newer 997bfd12208SRuslan Ermilovthan the file 998bfd12208SRuslan Ermilov.Pa ttt . 9999b50d902SRodney W. Grimes.It Li "find / \e! \e( -newer ttt -user wnj \e) -print" 1000bfd12208SRuslan ErmilovPrint out a list of all the files which are not both newer than 1001bfd12208SRuslan Ermilov.Pa ttt 1002bfd12208SRuslan Ermilovand owned by 1003bfd12208SRuslan Ermilov.Dq wnj . 10049b50d902SRodney W. Grimes.It Li "find / \e( -newer ttt -or -user wnj \e) -print" 1005bfd12208SRuslan ErmilovPrint out a list of all the files that are either owned by 1006bfd12208SRuslan Ermilov.Dq wnj 1007bfd12208SRuslan Ermilovor that are newer than 1008bfd12208SRuslan Ermilov.Pa ttt . 1009e578c242STom Rhodes.It Li "find / -newerct '1 minute ago' -print" 1010ea92232aSPoul-Henning KampPrint out a list of all the files whose inode change time is more 1011ea92232aSPoul-Henning Kamprecent than the current time minus one minute. 101254874bb6SRuslan Ermilov.It Li "find / -type f -exec echo {} \e;" 1013e578c242STom RhodesUse the 1014e578c242STom Rhodes.Xr echo 1 1015e578c242STom Rhodescommand to print out a list of all the files. 1016a05cb852SJilles Tjoelker.It Li "find -L /usr/ports/packages -type l -exec rm -- {} +" 10171c832963SOliver EikemeierDelete all broken symbolic links in 10181c832963SOliver Eikemeier.Pa /usr/ports/packages . 10191c832963SOliver Eikemeier.It Li "find /usr/src -name CVS -prune -o -depth +6 -print" 10201c832963SOliver EikemeierFind files and directories that are at least seven levels deep 10211c832963SOliver Eikemeierin the working directory 10221c832963SOliver Eikemeier.Pa /usr/src . 10231c832963SOliver Eikemeier.It Li "find /usr/src -name CVS -prune -o -mindepth 7 -print" 10241c832963SOliver EikemeierIs not equivalent to the previous example, since 10251c832963SOliver Eikemeier.Ic -prune 10261c832963SOliver Eikemeieris not evaluated below level seven. 10279b50d902SRodney W. Grimes.El 1028e578c242STom Rhodes.Sh COMPATIBILITY 1029e578c242STom RhodesThe 1030e578c242STom Rhodes.Ic -follow 103147d91ba3SDag-Erling Smørgravprimary is deprecated; the 103247d91ba3SDag-Erling Smørgrav.Fl L 103347d91ba3SDag-Erling Smørgravoption should be used instead. 103447d91ba3SDag-Erling SmørgravSee the 103547d91ba3SDag-Erling Smørgrav.Sx STANDARDS 103647d91ba3SDag-Erling Smørgravsection below for details. 10379b50d902SRodney W. Grimes.Sh SEE ALSO 1038567664c4SOllivier Robert.Xr chflags 1 , 10399b50d902SRodney W. Grimes.Xr chmod 1 , 10409b50d902SRodney W. Grimes.Xr locate 1 , 1041d740b7c7SPawel Jakub Dawidek.Xr lsvfs 1 , 104241cbb624SJoseph Koshy.Xr whereis 1 , 104341cbb624SJoseph Koshy.Xr which 1 , 1044a8d50686STom Rhodes.Xr xargs 1 , 10459b50d902SRodney W. Grimes.Xr stat 2 , 104653e87059STom Rhodes.Xr acl 3 , 10479b50d902SRodney W. Grimes.Xr fts 3 , 10489b50d902SRodney W. Grimes.Xr getgrent 3 , 10499b50d902SRodney W. Grimes.Xr getpwent 3 , 10509b50d902SRodney W. Grimes.Xr strmode 3 , 105193b8510cSGordon Bergling.Xr ascii 7 , 105294ad6032SRuslan Ermilov.Xr re_format 7 , 10539b50d902SRodney W. Grimes.Xr symlink 7 10549b50d902SRodney W. Grimes.Sh STANDARDS 10559b50d902SRodney W. GrimesThe 10568fe908efSRuslan Ermilov.Nm 10579b50d902SRodney W. Grimesutility syntax is a superset of the syntax specified by the 10581c832963SOliver Eikemeier.St -p1003.1-2001 10599b50d902SRodney W. Grimesstandard. 10609b50d902SRodney W. Grimes.Pp 10611c832963SOliver EikemeierAll the single character options except 1062fbccd9dbSRuslan Ermilov.Fl H 10631c832963SOliver Eikemeierand 1064fbccd9dbSRuslan Ermilov.Fl L 1065659a728eSCeri Daviesas well as 1066659a728eSCeri Davies.Ic -amin , -anewer , -cmin , -cnewer , -delete , -empty , -fstype , 1067659a728eSCeri Davies.Ic -iname , -inum , -iregex , -ls , -maxdepth , -mindepth , -mmin , 106875e6f664SDaniel Ebdrup Jensen.Ic -not , -path , -print0 , -regex , -sparse 1069440a24d8SCeri Daviesand all of the 107075e6f664SDaniel Ebdrup Jensen.Fl B* 1071440a24d8SCeri Daviesbirthtime related primaries are extensions to 10721c832963SOliver Eikemeier.St -p1003.1-2001 . 1073f6e4fb22SSteve Price.Pp 10749b50d902SRodney W. GrimesHistorically, the 107547d91ba3SDag-Erling Smørgrav.Fl d , L 10769b50d902SRodney W. Grimesand 10779b50d902SRodney W. Grimes.Fl x 1078bfd12208SRuslan Ermilovoptions were implemented using the primaries 1079bfd12208SRuslan Ermilov.Ic -depth , -follow , 1080bfd12208SRuslan Ermilovand 1081bfd12208SRuslan Ermilov.Ic -xdev . 10829b50d902SRodney W. GrimesThese primaries always evaluated to true. 10839b50d902SRodney W. GrimesAs they were really global variables that took effect before the traversal 10849b50d902SRodney W. Grimesbegan, some legal expressions could have unexpected results. 1085bfd12208SRuslan ErmilovAn example is the expression 1086bfd12208SRuslan Ermilov.Ic -print Cm -o Ic -depth . 1087bfd12208SRuslan ErmilovAs 1088bfd12208SRuslan Ermilov.Ic -print 1089bfd12208SRuslan Ermilovalways evaluates to true, the standard order of evaluation 1090bfd12208SRuslan Ermilovimplies that 1091bfd12208SRuslan Ermilov.Ic -depth 1092bfd12208SRuslan Ermilovwould never be evaluated. 10939b50d902SRodney W. GrimesThis is not the case. 10949b50d902SRodney W. Grimes.Pp 1095bfd12208SRuslan ErmilovThe operator 1096bfd12208SRuslan Ermilov.Cm -or 1097bfd12208SRuslan Ermilovwas implemented as 1098bfd12208SRuslan Ermilov.Cm -o , 1099bfd12208SRuslan Ermilovand the operator 1100bfd12208SRuslan Ermilov.Cm -and 1101bfd12208SRuslan Ermilovwas implemented as 1102bfd12208SRuslan Ermilov.Cm -a . 11039b50d902SRodney W. Grimes.Pp 11049b50d902SRodney W. GrimesHistoric implementations of the 1105bfd12208SRuslan Ermilov.Ic -exec 11069b50d902SRodney W. Grimesand 1107bfd12208SRuslan Ermilov.Ic -ok 1108bfd12208SRuslan Ermilovprimaries did not replace the string 1109bfd12208SRuslan Ermilov.Dq Li {} 1110bfd12208SRuslan Ermilovin the utility name or the 11119b50d902SRodney W. Grimesutility arguments if it had preceding or following non-whitespace characters. 11129b50d902SRodney W. GrimesThis version replaces it no matter where in the utility name or arguments 11139b50d902SRodney W. Grimesit appears. 11147c1d4b3aSAkinori MUSHA.Pp 11157c1d4b3aSAkinori MUSHAThe 11167c1d4b3aSAkinori MUSHA.Fl E 111747d91ba3SDag-Erling Smørgravoption was inspired by the equivalent 11187c1d4b3aSAkinori MUSHA.Xr grep 1 11197c1d4b3aSAkinori MUSHAand 112047d91ba3SDag-Erling Smørgrav.Xr sed 1 112147d91ba3SDag-Erling Smørgravoptions. 1122*2a121b97SRicardo Branco.Pp 1123*2a121b97SRicardo BrancoThe 1124*2a121b97SRicardo Branco.Ic -perm 1125*2a121b97SRicardo Brancoprimary accepts a leading slash 1126*2a121b97SRicardo Branco.Pq Dq Li / 1127*2a121b97SRicardo Brancoas an alias for a leading plus 1128*2a121b97SRicardo Branco.Pq Dq Li + 1129*2a121b97SRicardo Brancofor its argument as an extension of 1130*2a121b97SRicardo Branco.St -p1003.1-2001 1131*2a121b97SRicardo Brancoto be compatible with GNU find. 1132ad487600SColin Percival.Sh HISTORY 1133a9275d99SGordon BerglingA simple 1134ad487600SColin Percival.Nm 1135ad487600SColin Percivalcommand appeared in 1136a9275d99SGordon Bergling.At v1 1137a9275d99SGordon Berglingand was removed in 1138a9275d99SGordon Bergling.At v3 . 1139a9275d99SGordon BerglingIt was rewritten for 1140a9275d99SGordon Bergling.At v5 1141a9275d99SGordon Berglingand later be enhanced for the Programmer's Workbench (PWB). 1142a9275d99SGordon BerglingThese changes were later incorporated in 1143a9275d99SGordon Bergling.At v7 . 11449b50d902SRodney W. Grimes.Sh BUGS 11459b50d902SRodney W. GrimesThe special characters used by 11468fe908efSRuslan Ermilov.Nm 11479b50d902SRodney W. Grimesare also special characters to many shell programs. 1148bfd12208SRuslan ErmilovIn particular, the characters 1149bfd12208SRuslan Ermilov.Dq Li * , 1150bfd12208SRuslan Ermilov.Dq Li \&[ , 1151bfd12208SRuslan Ermilov.Dq Li \&] , 1152bfd12208SRuslan Ermilov.Dq Li \&? , 1153bfd12208SRuslan Ermilov.Dq Li \&( , 1154bfd12208SRuslan Ermilov.Dq Li \&) , 1155bfd12208SRuslan Ermilov.Dq Li \&! , 1156bfd12208SRuslan Ermilov.Dq Li \e 1157bfd12208SRuslan Ermilovand 1158bfd12208SRuslan Ermilov.Dq Li \&; 1159bfd12208SRuslan Ermilovmay have to be escaped from the shell. 11609b50d902SRodney W. Grimes.Pp 11619b50d902SRodney W. GrimesAs there is no delimiter separating options and file names or file 11629b50d902SRodney W. Grimesnames and the 11639b50d902SRodney W. Grimes.Ar expression , 1164bfd12208SRuslan Ermilovit is difficult to specify files named 1165bfd12208SRuslan Ermilov.Pa -xdev 1166bfd12208SRuslan Ermilovor 1167bfd12208SRuslan Ermilov.Pa \&! . 11689b50d902SRodney W. GrimesThese problems are handled by the 11699b50d902SRodney W. Grimes.Fl f 11709b50d902SRodney W. Grimesoption and the 11719b50d902SRodney W. Grimes.Xr getopt 3 1172bfd12208SRuslan Ermilov.Dq Fl Fl 1173bfd12208SRuslan Ermilovconstruct. 1174abacbbbfSPeter Wemm.Pp 1175abacbbbfSPeter WemmThe 1176abacbbbfSPeter Wemm.Ic -delete 117756f7a840SBill Fumerolaprimary does not interact well with other options that cause the file system 1178abacbbbfSPeter Wemmtree traversal options to be changed. 1179ad487600SColin Percival.Pp 11804f45d811STim J. RobbinsThe 1181dfef91e9SColin Percival.Ic -mindepth 1182dfef91e9SColin Percivaland 1183dfef91e9SColin Percival.Ic -maxdepth 11842cb640f6SColin Percivalprimaries are actually global options (as documented above). 11852cb640f6SColin PercivalThey should 1186dfef91e9SColin Percivalprobably be replaced by options which look like options. 1187