summaryrefslogtreecommitdiffstats
path: root/usr.bin/find
Commit message (Collapse)AuthorAgeFilesLines
* The implementation of -flags was broken and did not match the (poorly)ru2001-09-043-31/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | documented behavior. Only a certain set of file flags were recognized, and "no" flags did not match files that have corresponding flags bits turned off. Fix and extend the -flags functionality as follows: : -flags [-|+]<flags>,<notflags> : The flags are specified using symbolic names (see chflags(1)). : Those with the "no" prefix (except "nodump") are said to be : <notflags>. Flags in <flags> are checked to be set, and flags in : <notflags> are checked to be not set. Note that this is different : from -perm, which only allows the user to specify mode bits that : are set. : : If flags are preceded by a dash (``-''), this primary evaluates : to true if at least all of the bits in <flags> and none of the bits : in <notflags> are set in the file's flags bits. If flags are pre- : ceded by a plus (``+''), this primary evaluates to true if any of : the bits in <flags> is set in the file's flags bits, or any of the : bits in <notflags> is not set in the file's flags bits. Otherwise, : this primary evaluates to true if the bits in <flags> exactly match : the file's flags bits, and none of the <flags> bits match those of : <notflags>. MFC after: 2 weeks
* Sort predicates.ru2001-08-311-70/+70
| | | | PR: docs/30237
* Restore the `-perm +mode' feature.ru2001-08-301-2/+2
| | | | | Broken in the "close a PR" race, in revision 1.30. Note that the patch in the PR did not have this bug!
* Remove emalloc and expand to the malloc + error checking it was, where used.obrien2001-07-243-20/+9
|
* Quiet a [useless] compiler warning.obrien2001-07-231-1/+1
|
* Clarify the feature that -exec parameters won't getyar2001-06-291-0/+5
| | | | | | shell-expanded when the specified utility is run. MFC after: 5 days
* mdoc(7) police: fix markup.ru2001-05-161-198/+255
|
* They add the following commands:phk2001-05-039-927/+793
| | | | | | | | | | | | | | | | | | | | | -anewer -cnewer -mnewer -okdir -newer[acm][acmt] With it, you can form queries like find . -newerct '1 minute ago' -print As an extra bonus, the program is ANSI-fied - the original version relies on some obscure features of K&R C. (This PR was submitted in 1999, and the submittor has kept the patch updated ever since, hats off for him guys, and how about you close a PR ??) PR: 9374 Submitted by: Martin Birgmeier <Martin.Birgmeier@aon.at>
* Don't attempt to parse %c, use nl_langinfo insteadache2001-03-211-13/+16
|
* MAXPATHLEN already accounts for the trailing NUL, so no need to add one in.imp2001-03-011-1/+1
| | | | | In addition, since we pass readlink MAXPATHLEN - 1, we would have never have used that extra byte anyway.
* mdoc(7) police: restore correct order of references in the SEE ALSO.ru2001-02-241-1/+1
|
* Implement the following options and primaries:knu2001-02-237-7/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | -E Interpret regular expressions followed by -regex and -iregex op- tions as extended (modern) regular expressions rather than basic regular expressions (BRE's). The re_format(7) manual page fully describes both formats. -iname pattern Like -name, but the match is case insensitive. -ipath pattern Like -path, but the match is case insensitive. -regex pattern True if the whole path of the file matches pattern using regular expression. To match a file named ``./foo/xyzzy'', you can use the regular expression ``.*/[xyz]*'' or ``.*/foo/.*'', but not ``xyzzy'' or ``/foo/''. -iregex pattern Like -regex, but the match is case insensitive. These are meant to be compatible with other find(1) implementations such as GNU's or NetBSD's except regexp library differences. Reviewed by: sobomax, dcs, and some other people on -current
* mdoc(7) police: split punctuation characters + misc fixes.ru2001-02-011-2/+1
|
* Add the -empty flag, from OpenBSD. It returns true if the directorypeter2001-01-235-2/+49
| | | | | | | | | | | is empty. There doesn't appear to be another easy way to do this. mobile# mkdir foo mobile# mkdir foo/bar mobile# mkdir bar mobile# find . -empty ./foo/bar ./bar
* Prepare for mdoc(7)NG.ru2001-01-161-1/+1
|
* Prepare for mdoc(7)NG.ru2000-12-191-4/+11
|
* mdoc(7) police: use the new features of the Nm macro.ru2000-11-201-20/+20
|
* "minute(s) period(s)" --> "minute(s)"mph2000-11-171-6/+6
|
* Make passing unknown fstypes to -fstype result in a warning instead ofeivind2000-07-281-2/+16
| | | | | | an error. As it was, which find command lines that would work (be accepted at all) was dependent on the presently running kernel, making script writing and porting hard.
* Switch over to using the new fflagstostr and strtofflags library calls.joe2000-06-172-5/+2
|
* Make find -Wall -Wredundant-decls clean.roberto2000-06-141-4/+0
| | | | Submitted by: nrahlstr
* This patch adds the -mindepth and -maxdepth options to find(1), whichroberto2000-06-1211-6/+115
| | | | | | | | | | | | behave as in GNU find (and of course as described in the manual page diff included). I think these options would be useful for some people. Some missing $FreeBSD$ tags are also added. The patch was slightly modified (send-pr mangling of TABS). PR: bin/18941 Submitted by: Ben Smithurst <ben@scientia.demon.co.uk>
* The find -perm option currently supports an exact match,roberto2000-06-123-1/+9
| | | | | | | | | | or if the mode is preceded by a '-', it checks for a match in at least the bits specified on the command line. It is often desirable to find things with any execute or setuid or setgid bits set. PR: bin/10169 Submitted by: Monte Mitzelfelt <monte@gonefishing.org>
* Fix errors in .Xr usage.nik2000-03-011-3/+3
| | | | | PR: docs/17057 Submitted by: Submitted by: Udo Erdelhoff <ue@nathan.ruhr.de>
* Revert part of the last commit, remove {g|s}etflags from the libcjoe2000-02-052-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | interface, and statically link them to the programs using them. These functions, upon reflection and discussion, are too generically named for a library interface with such specific functionality. Also the api that they use, whilst ok for private use, isn't good enough for a libc function. Additionally there were complications with the build/install-world process. It depends heavily upon xinstall, which got broken by the change in api, and caused bootstrap problems and general mayhem. There is work in progress to address future problems that may be caused by changes in install-chain tools, and better names for {g|s}etflags can be derived when some future program requires them. For now the code has been left in src/lib/libc/gen (it started off in src/bin/ls). It's important to provide library functions for manipulating file flag strings if we ever want this interface to be adopted outside of the source tree, but now isn't necessarily the right moment with 4.0-release just around the corner. Approved: jkh
* Historically file flags (schg, uschg, etc) have been converted fromjoe2000-01-272-5/+1
| | | | | | | | | | | | | | | | | string to u_long and back using two functions, flags_to_string and string_to_flags, which co-existed with 'ls'. As time has progressed more and more other tools have used these private functions to manipulate the file flags. Recently I moved these functions from /usr/src/bin/ls to libutil, but after some discussion with bde it's been decided that they really ought to go in libc. There are two already existing libc functions for manipulating file modes: setmode and getmode. In keeping with these flags_to_string has been renamed getflags and string_to_flags to setflags. The manual page could probably be improved upon ;)
* Added missing DPADD's. Removed unrequired SRCS's.joe2000-01-011-0/+1
| | | | Obtained from: bde
* Moved flags_to_string and string_to_flags into libutil. It's used injoe1999-12-301-2/+2
| | | | many places nowadays.
* Second part of bin/3648: add -flags to search for specific flags.roberto1999-12-196-4/+87
| | | | | | | | I added $FreeBSD$ whicle I was here. The patch wasn't usable anymore due to its age so I adapted it. PR: bin/3648 Submitted by: Martin Birgmeier <mbirg@austria.ds.philips.com>
* -Wall: remove unused variable, initialize variable to avoid gcc stupidity.billf1999-09-061-1/+3
|
* $Id$ -> $FreeBSD$peter1999-08-282-2/+2
|
* The -perm option takes argument [-]mode, not [-mode]kris1999-06-061-3/+6
| | | | Obtained from: NetBSD, by way of OpenBSD
* Clarify wording to indicate that the arguments to find(1) are path namesjkoshy1999-04-191-6/+6
| | | | | | | | | (and can be both files or directories). Show white space between "(", ")", "!" and their corresponding `expression' arguments as expected by the expression parser inside find(1). Prompted by: David Honig <David.Honig@idt.com> on freebsd-doc Message-Id: <199904132055.NAA09432@justinian.Eng.idt.com>
* Typo - "the -delete primary do not.." -> "the -delete primary does not.."billf1998-12-311-2/+2
| | | | | PR: docs/9255 Submitted by: Christian Weisgerber <naddy@bigeye.rhein-neckar.de>
* Return memory from setmode.imp1998-12-161-0/+1
| | | | Obtained from: OpenBSD
* Fixed style bugs in previous commit.bde1998-11-291-1/+1
|
* Fixed English in previous commit. Clarify "lexicographical order".bde1998-11-291-8/+14
| | | | | Don't format paragraphs manually (new sentences not beginning on new lines give hard-formatted line breaks).
* Fixed my English fixes.bde1998-11-292-2/+3
|
* Fixed style bugs and English in previous commit.bde1998-11-291-15/+16
|
* Fixed disorder and and usage message. Improved English.bde1998-11-291-2/+2
| | | | Broken in: previous commit
* Fixed disordering in previous commit.bde1998-11-291-1/+1
|
* Added a sort option to find(1).wosch1998-11-294-5/+37
| | | | | The sort option make it possible to build the locate database without large (usually 20-100MB) temp files.
* Calls one or more of malloc(), warn(), err(), syslog(), execlp() ordes1998-10-131-2/+2
| | | | | | | | | | | execvp() in the child branch of a vfork(). Changed to use fork() instead. Some of these (mv, find, apply, xargs) might benefit greatly from being rewritten to use vfork() properly. PR: Loosely related to bin/8252 Approved by: jkh and bde
* PR: 7522thepish1998-08-101-1/+1
| | | | | Correct bug in the inverse operator optimisation code which caused segv on ! without a following expression.
* Fixed printf format errors.bde1998-07-061-1/+1
|
* Make sure we pass the length - 1 to readlink, since it adds its ownimp1998-06-091-1/+1
| | | | | | NUL at the end of the path. Inspired by: OpenBSD's changes in this area by theo de raadt
* Add cross references for find(1), locate(1), whereis(1) and which(1).jkoshy1998-05-151-1/+3
| | | | | Submitted by: Josh Gillam <josh@quick.net> PR: docs/6642
* Removed definition of _NEW_VFSCONF. The new vfsconf interface is nowbde1998-01-201-1/+0
| | | | the default.
* A partial frontal lobotomy for find if using the NetBSD libc whichjb1998-01-103-1/+12
| | | | | | | | | doesn't know about getvfsbyname() and the vfsconf structure. This disables the -fstype option if compiled with a pre-processor that defines __NetBSD__. With the FreeBSD built pre-processor, find can only be built with the FreeBSD libc. So when running with a NetBSD kernel, FreeBSD's libc will have to return ENOSYS for things that NetBSD doesn't support. That's life in a hybrid world.
* Sort option list so that -amin works.steve1997-11-281-1/+5
| | | | | PR: 5171 Submitted by: Dmitrij Tejblum <tejblum@arc.hq.cti.ru>
OpenPOWER on IntegriCloud