summaryrefslogtreecommitdiffstats
path: root/usr.bin/find/main.c
Commit message (Collapse)AuthorAgeFilesLines
* find: Run when cwd cannot be opened, except with -execdir or -delete.jilles2013-02-101-1/+1
| | | | | | | | | | | fts(3) can run (albeit more slowly and imposing the {PATH_MAX} limit) when the current directory cannot be opened. Therefore, do not make a failure to open the current directory (for returning to it later in -exec) fatal. If -execdir or -delete are used, the expectation is that fts(3) will use chdir to avoid race conditions (except for -execdir with -L). Do not break this expectation any more than it already is by still failing if the current directory cannot be opened.
* find: Do not pass fd to save current directory to child processes.jilles2012-09-261-1/+1
| | | | | | | This removes one of the two wrongly passed file descriptors. The other one appears to be from fts(3). MFC after: 1 week
* find: Remove unnecessary and inconsistent initialization.jilles2012-07-311-1/+1
| | | | Submitted by: jhb
* find: Implement real -ignore_readdir_race.jilles2012-07-251-0/+1
| | | | | | | | | | If -ignore_readdir_race is present, [ENOENT] errors caused by deleting a file after find has read its name from a directory are ignored. Formerly, -ignore_readdir_race did nothing. PR: bin/169723 Submitted by: Valery Khromov and Andrey Ignatov
* Replace char copyright[] by static const char copyright[].ed2011-12-101-1/+1
| | | | It seems the latter is used throughout the tree.
* find: Exit if there is an unknown option.jilles2011-06-041-1/+1
| | | | | | | | | | | | Ignoring the parameter with the unknown options is unlikely to be what was intended. Example: find -n . Note that things like find -n already caused an exit, equivalent to "find" by itself.
* Remove the advertising clause from UCB copyrighted files in usr.bin. Thisjoel2010-12-111-4/+0
| | | | | | | | | is in accordance with the information provided at ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change Also add $FreeBSD$ to a few files to keep svn happy. Discussed with: imp, rwatson
* Revert r207677 which is considered a violation of style(9).delphij2010-05-061-2/+6
| | | | | Pointed out by: bde Pointy hat to: delphij
* Move SCCS tags to comments as they were already #if 0'ed.delphij2010-05-051-6/+2
|
* Revert most part of 200420 as requested, as more review and polish isdelphij2009-12-131-0/+1
| | | | needed.
* Remove unneeded header includes from usr.bin/ except contributed code.delphij2009-12-111-1/+0
| | | | Tested with: make universe
* Fix SYNOPSIS and usage().ru2008-03-031-2/+3
|
* Fix all WARNS. Checked with "make WARNS=9". Remove unused file.markm2003-06-141-4/+3
|
* Fix SCM IDs.obrien2002-04-011-3/+2
|
* Remove __P().markm2002-03-201-1/+1
|
* 1) Remove -Wall from Makefile.dwmalone2002-02-271-1/+1
| | | | | | 2) WARNs fixes (rename option to lookup_option to avoid shadowing, rename argv to argv1 to avoid shadowing, const stuff, prototypes, __unused). 3) Remove "register"s.
* Implement the following options and primaries:knu2001-02-231-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | -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
* This patch adds the -mindepth and -maxdepth options to find(1), whichroberto2000-06-121-0/+6
| | | | | | | | | | | | 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>
* Fixed my English fixes.bde1998-11-291-1/+1
|
* Fixed disorder and and usage message. Improved English.bde1998-11-291-2/+2
| | | | Broken in: previous commit
* Added a sort option to find(1).wosch1998-11-291-1/+5
| | | | | The sort option make it possible to build the locate database without large (usually 20-100MB) temp files.
* Eliminate a variable that is set but never used.jdp1997-05-191-5/+4
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-291-1/+1
| | | | posix standard on the topic.
* Merge from Lite2 - use new getvfsbyname() and related changes.peter1997-03-111-1/+2
| | | | understand whiteouts (FTS_W from fts()).
* Localize itache1996-08-121-0/+3
|
* Remove trailing whitespace.rgrimes1995-05-301-1/+1
|
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+153
OpenPOWER on IntegriCloud