History log of /freebsd-current/usr.bin/find/main.c
Revision Date Author Comments
# d06a0096 11-Jan-2024 Goran Mekić <meka@tilda.center>

find: add SIGINFO handler

Print number of files processed and path currently being processed on
SIGINFO.

Reviewed by: des, asomers
Sponsored by: Axcient
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D43380


# 0b8224d1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

Remove copyright strings ifdef'd out

We've ifdef'd out the copyright strings for some time now. Go ahead and
remove the ifdefs. Plus whatever other detritis was left over from other
recent removals. These copyright strings are present in the comments and
are largely from CSRG's attempt at adding their copyright to every
binary file (which modern interpretations of the license doesn't
require).

Sponsored by: Netflix


# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# 1d386b48 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# a1b6427a 07-Jul-2023 Alfonso Gregory <gfunni234@gmail.com>

Mark usage function as __dead2 in programs where it does not return

In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735


# b422540a 01-Jul-2018 Eitan Adler <eadler@FreeBSD.org>

find(1): deLINTify


# c305c18e 12-Dec-2017 Eitan Adler <eadler@FreeBSD.org>

find(1): remove unused variable


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# 7a79617c 12-Apr-2014 Jilles Tjoelker <jilles@FreeBSD.org>

find: Correctly propagate -exec/-execdir ... {} + exit status.

As per POSIX, the -exec ... {} + primary always returns true, but a non-zero
exit status causes find to return a non-zero exit status itself. GNU does
the same, and also for -execdir ... {} +.

It does not make much sense to return false from the primary only when the
child process happens to be run.

The behaviour for -exec/-execdir ... ; remains unchanged: the primary
returns true or false depending on the exit status, and find's exit status
is unaffected.


# 17ef6d3a 10-Feb-2013 Jilles Tjoelker <jilles@FreeBSD.org>

find: Run when cwd cannot be opened, except with -execdir or -delete.

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.


# bedab466 26-Sep-2012 Jilles Tjoelker <jilles@FreeBSD.org>

find: Do not pass fd to save current directory to child processes.

This removes one of the two wrongly passed file descriptors. The other one
appears to be from fts(3).

MFC after: 1 week


# b5626796 31-Jul-2012 Jilles Tjoelker <jilles@FreeBSD.org>

find: Remove unnecessary and inconsistent initialization.

Submitted by: jhb


# 40072dc2 25-Jul-2012 Jilles Tjoelker <jilles@FreeBSD.org>

find: Implement real -ignore_readdir_race.

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


# 516c8ed9 10-Dec-2011 Ed Schouten <ed@FreeBSD.org>

Replace char copyright[] by static const char copyright[].

It seems the latter is used throughout the tree.


# 535d7745 04-Jun-2011 Jilles Tjoelker <jilles@FreeBSD.org>

find: Exit if there is an unknown option.

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.


# da52b4ca 11-Dec-2010 Joel Dahl <joel@FreeBSD.org>

Remove the advertising clause from UCB copyrighted files in usr.bin. This
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


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# 3549ef2f 06-May-2010 Xin LI <delphij@FreeBSD.org>

Revert r207677 which is considered a violation of style(9).

Pointed out by: bde
Pointy hat to: delphij


# d18129ea 05-May-2010 Xin LI <delphij@FreeBSD.org>

Move SCCS tags to comments as they were already #if 0'ed.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# 821df508 12-Dec-2009 Xin LI <delphij@FreeBSD.org>

Revert most part of 200420 as requested, as more review and polish is
needed.


# 6f2d3221 11-Dec-2009 Xin LI <delphij@FreeBSD.org>

Remove unneeded header includes from usr.bin/ except contributed code.

Tested with: make universe


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# dfab7fb1 03-Mar-2008 Ruslan Ermilov <ru@FreeBSD.org>

Fix SYNOPSIS and usage().


# ef646f18 14-Jun-2003 Mark Murray <markm@FreeBSD.org>

Fix all WARNS. Checked with "make WARNS=9". Remove unused file.


# 3077469e 01-Apr-2002 David E. O'Brien <obrien@FreeBSD.org>

Fix SCM IDs.


# ecca1f1c 20-Mar-2002 Mark Murray <markm@FreeBSD.org>

Remove __P().


# e98080b1 27-Feb-2002 David Malone <dwmalone@FreeBSD.org>

1) Remove -Wall from Makefile.
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.


# 7c1d4b3a 23-Feb-2001 Akinori MUSHA <knu@FreeBSD.org>

Implement the following options and primaries:

-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


# c76bc8f3 12-Jun-2000 Ollivier Robert <roberto@FreeBSD.org>

This patch adds the -mindepth and -maxdepth options to find(1), which
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>


# 1b4db9d1 29-Nov-1998 Bruce Evans <bde@FreeBSD.org>

Fixed my English fixes.


# 154708b4 29-Nov-1998 Bruce Evans <bde@FreeBSD.org>

Fixed disorder and and usage message. Improved English.

Broken in: previous commit


# 6d0c7e13 28-Nov-1998 Wolfram Schneider <wosch@FreeBSD.org>

Added a sort option to find(1).

The sort option make it possible to build the locate
database without large (usually 20-100MB) temp files.


# 5cc6677f 19-May-1997 John Polstra <jdp@FreeBSD.org>

Eliminate a variable that is set but never used.


# 1c8af878 28-Mar-1997 Warner Losh <imp@FreeBSD.org>

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 841484cd 11-Mar-1997 Peter Wemm <peter@FreeBSD.org>

Merge from Lite2 - use new getvfsbyname() and related changes.
understand whiteouts (FTS_W from fts()).


# 0da30e9a 11-Mar-1997 Peter Wemm <peter@FreeBSD.org>

Import some parts of CSRG 4.4BSD-Lite2 usr.bin sources to fix tree build.


# bf4fce1a 12-Aug-1996 Andrey A. Chernov <ache@FreeBSD.org>

Localize it


# 7799f52a 30-May-1995 Rodney W. Grimes <rgrimes@FreeBSD.org>

Remove trailing whitespace.


# 9b50d902 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources