summaryrefslogtreecommitdiff
path: root/usr.bin/find
AgeCommit message (Collapse)Author
2015-10-10normalize a few more tame request orderings, to help reviewTheo de Raadt
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-05If expression omits -exec/execdir/-ok primaries, then find will neverTheo de Raadt
enter the fork+execve codepath. That allows use of "stdio getpw rpath"! Use of -exec methods have been discouraged for years anyways, with -print0/xargs -0 now considered safer practice. ok guenther millert
2015-09-11delete bogus escaping from ellipsis to forestall cargo cult effectsIngo Schwarze
2015-07-14Don't dereference a freed pointer when updating the value of p.Todd C. Miller
Noted by tedu@
2015-07-14Convert the last remaining realloc() in find to reallocarray().Todd C. Miller
2015-07-14In brace_subst() if we realloc() the store, update p so that itTodd C. Miller
points into the new store, not the old one. From Gregor Best.
2015-04-18Convert many atoi() calls to strtonum(), adding range checks and failureTheo de Raadt
handling along the way. Reviews by Brendan MacDonell, Jeremy Devenport, florian, doug, millert
2015-03-15tzfile.h is an internal header that should never have been installed.Todd C. Miller
What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
2015-02-28Reduce usage of predefined strings in manpages.Anthony J. Bentley
Predefined strings are not very portable across troff implementations, and they make the source much harder to read. Usually the intended character can be written directly. No output changes, except for two instances where the incorrect escape was used in the first place. tweaks + ok schwarze@
2015-01-19Make some $OpenBSD$ lines prettier/standardier by eliminatingKenneth R Westerback
superflous '*' after '/*' and adding blank after terminating '$'. Also eases parsing of the lines by simple awk scripts. Aesthetic approval from tedu@.
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2014-12-03document -o and -a; requested by yonJason McIntyre
i had to tweak their descriptions a little to make the text read nicely while here, fix some minor issues: - kill some unneeded Xo/Xc - kill some unneeded Tn - replace "\*Gt" with ">"
2014-12-01Use warnc() to use the correct errno value for FTS_DNR, FTS_NS andTodd C. Miller
FTS_ERR. From Piotr Durlej.
2014-05-18use reallocarrayMarc Espie
okay chl@, tedu@
2014-03-20- use more portable -o in examples, requested by millert and sobradoJason McIntyre
- tweak STANDARDS to make the note about -and and -or a little clearer - remove some gnu clutter ok millert sobrado
2014-01-20Obvious .Xr fixes, found while testing mandocdb(8).Ingo Schwarze
2014-01-10Copy changes from ls -l to find -ls: print future times with year and usePhilip Guenther
strftime() instead of parsing ctime()'s output. ok millert@
2013-11-15Include unistd.h as it is the standard location for getopt().Todd C. Miller
2013-04-23handle large ino_t; ok millertTheo de Raadt
2013-04-20adjust commentTheo de Raadt
2013-04-19handle large numbers. this fixes time_t beyond 2038, constrains theTheo de Raadt
range of i_num correctly, and now handles files > 4GB in size on 32-bit machines. ok otto millert
2013-03-14-follow is the same as -L, not -HAlexander Hall
second occurance pointed out by Jeremie Courreges-Anglas, thanks! ok guenther@ on the first occurance
2012-12-05Remove excessive sys/cdefs.h inclusionTheo de Raadt
ok guenther millert kettenis
2012-01-05-execdir only supports the first form of -exec with ; suffix, not the newStuart Henderson
form with {} + suffix; make this clear in the manual. Text suggested by jmc@
2012-01-05Fix typos in comment (s,exacty,exactly,)Stuart Henderson
2012-01-03- use more consistent markupJason McIntyre
- reformat the list of primaries such that the two -exec items are listed without vertical whitespace seperating them
2012-01-02Add support for "find ... -exec foo {} \+".Pascal Stumpf
From the manpage: If terminated by a plus sign (``+''), the pathnames for which the primary is evaluated are aggregated into sets, and utility will be invoked once per set, similar to xargs(1). If any invocation exits with non-zero exit status, then find will eventually do so as well, but this does not cause find to exit early. The string ``{}'' must appear, and must appear last. Each set is limited to no more than 5,000 pathnames, and is also limited such that the invocation of utility does not exceed ARG_MAX. Code comes from NetBSD, written by John Hawkinson. Tested by eivinde at terraplane dot org and myself for quite some time. ok miod@
2011-06-14exit if there is an unknown option; from FreeBSDChristian Weisgerber
ok millert@
2011-04-21find: return exit code 1 if any path could not be traversedJacek Masiulaniec
matches posix and the manual, ok millert
2011-02-13As noticed by Clint Pachl <pachl at ecentryx dot com>,Ingo Schwarze
it is easy to miss a blank character in an example, so explicitely state that whitespace causes the issue; while here, mention that shell metacharacters cause danger as well; ok otto@ sthen@ jmc@
2010-12-01Don't error out if we can't opendir() when -empty is used.Todd C. Miller
Fix by Bakul Shah. OK deraadt@ halex@
2010-09-29various EXIT STATUS fixes; from Daniel DickmanJason McIntyre
2010-09-20oops! missing quote in previous;Jason McIntyre
2010-09-19Shorten text pointing from -X to -print0.Ingo Schwarze
Add pointer from -print0 to xargs(1). Add an EXAMPLE to demonstrate \( ... -or ... \) -print0. Stop advertising -print | xargs, which is dangerous. Add a CAVEAT about passing find(1) output to other programs. Mostly from joachimschipper dot nl; using feedback from jmc@ and sthen@, and tweaked myself; ok jmc@
2010-07-15More delimiters that need quoting inside macros, hunted down by jmc@,Ingo Schwarze
who asked me to commit because he is just running out of the door.
2010-02-03make it clear that -iname supports globbing;Ingo Schwarze
refer to glob(7) for more precision; add some relevant and remove some not so relevant .Xrs; ok jmc@
2009-12-20Use the standard wording, requested by jmc@.Ingo Schwarze
Actually, this is much closer to the original submission by Daniel Dickmann.
2009-12-20find -LH was -L, but must be -H according to POSIX;Ingo Schwarze
patch from Daniel Dickman <didickman at gmail dot com> via tech@, though i'm updating the manual in a different way; ok millert@ "looks good" deraadt@
2009-12-09We only need to fchdir(dotfd) for the -exec and -ok primaries soTodd C. Miller
defer the check for dotfd != -1 until we know we will need it. Based on a diff from schwarze@
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2009-09-16Allow -maxdepth 0; noticed by bluhm@Todd C. Miller
2009-08-27Don't stop traversing a directory hierarchy if we reach SHRT_MAX,Todd C. Miller
just stop updating fts_level so we don't overflow it. This allows rm, find, etc to operate on very deep hierarchies. Consumers of fts(3) do need to be aware that the actual level may be larger than fts_level. During the next libc major bump we will make fts_level an int instead of a short. OK deraadt@
2009-04-09min/maxdepth do not observe +-;Jason McIntyre
reported by x, but different fix taken
2009-02-08updates to IEEE Std 1003.1-2008;Jason McIntyre
2009-02-08bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a fewJason McIntyre
updates to follow;
2009-01-28since -g is always overridden by -l in ls(1), the equivalent of theJason McIntyre
-ls primary is better described as "ls -dils" than "ls -dgils";
2008-09-29Add a missing `|' to the description of -perm.Matthias Kilian
ok jmc@
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-30- use a consistent text for STANDARDSJason McIntyre
- note which options are extensions to POSIX