Skip site navigation (1)Skip section navigation (2)

CVS log for src/usr.bin/find/function.c

[BACK] Up to [FreeBSD] / src / usr.bin / find

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.71.2.1.2.1: download - view: text, markup, annotated - select for diffs
Fri Nov 11 04:20:22 2011 UTC (2 months, 4 weeks ago) by kensmith
Branches: RELENG_9_0
CVS tags: RELENG_9_0_0_RELEASE
Diff to: previous 1.71.2.1: preferred, colored
Changes since revision 1.71.2.1: +0 -0 lines
SVN rev 227445 on 2011-11-11 04:20:22Z by kensmith

Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
cycle.

Approved by:	re (implicit)

Revision 1.71.2.1: download - view: text, markup, annotated - select for diffs
Fri Sep 23 00:51:37 2011 UTC (4 months, 2 weeks ago) by kensmith
Branches: RELENG_9
CVS tags: RELENG_9_0_BP
Branch point for: RELENG_9_0
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +0 -0 lines
SVN rev 225736 on 2011-09-23 00:51:37Z by kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by:	re (implicit)

Revision 1.58.2.4: download - view: text, markup, annotated - select for diffs
Tue Jul 19 03:30:42 2011 UTC (6 months, 3 weeks ago) by avatar
Branches: RELENG_7
Diff to: previous 1.58.2.3: preferred, colored; branchpoint 1.58: preferred, colored; next MAIN 1.59: preferred, colored
Changes since revision 1.58.2.3: +6 -20 lines
SVN rev 224208 on 2011-07-19 03:30:42Z by avatar

MFC r223035: Using statfs.f_fstypename rather than statfs.f_type whilst
performing fstype comparsion as nullfs will copy f_type from underlayer FS.

PR:		bin/156258
Submitted by:	Marcin Wisnicki <mwisnicki+freebsd@gmail.com>

Revision 1.62.2.5: download - view: text, markup, annotated - select for diffs
Mon Jul 18 04:54:12 2011 UTC (6 months, 3 weeks ago) by avatar
Branches: RELENG_8
Diff to: previous 1.62.2.4: preferred, colored; branchpoint 1.62: preferred, colored; next MAIN 1.63: preferred, colored
Changes since revision 1.62.2.4: +6 -20 lines
SVN rev 224173 on 2011-07-18 04:54:12Z by avatar

MFC r223035: Using statfs.f_fstypename rather than statfs.f_type whilst
performing fstype comparsion as nullfs will copy f_type from underlayer FS.

PR:		bin/156258
Submitted by:	Marcin Wisnicki <mwisnicki+freebsd@gmail.com>

Revision 1.71: download - view: text, markup, annotated - select for diffs
Mon Jun 13 05:22:07 2011 UTC (7 months, 4 weeks ago) by avatar
Branches: MAIN
CVS tags: RELENG_9_BP, HEAD
Branch point for: RELENG_9
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +6 -20 lines
SVN rev 223035 on 2011-06-13 05:22:07Z by avatar

Using statfs.f_fstypename rather than statfs.f_type whilst performing fstype
comparsion as nullfs will copy f_type from underlayer FS.

PR:		bin/156258
Submitted by:	Marcin Wisnicki <mwisnicki+freebsd@gmail.com>
MFC after:	1 month

Revision 1.62.2.4: download - view: text, markup, annotated - select for diffs
Tue Dec 28 02:25:32 2010 UTC (13 months, 1 week ago) by kevlo
Branches: RELENG_8
Diff to: previous 1.62.2.3: preferred, colored; branchpoint 1.62: preferred, colored
Changes since revision 1.62.2.3: +1 -1 lines
SVN rev 216750 on 2010-12-28 02:25:32Z by kevlo

MFC r216106:
Don't error out while searching for empty directories.

Submitted by:	Bakul Shah <bakul at bitblocks dot com>

Revision 1.58.2.3.2.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:10:29 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_7_4
CVS tags: RELENG_7_4_0_RELEASE
Diff to: previous 1.58.2.3: preferred, colored; next MAIN 1.58.2.4: preferred, colored
Changes since revision 1.58.2.3: +0 -0 lines
SVN rev 216618 on 2010-12-21 17:10:29Z by kensmith

Copy stable/7 to releng/7.4 in preparation for FreeBSD-7.4 release.

Approved by:	re (implicit)

Revision 1.62.2.3.4.1: download - view: text, markup, annotated - select for diffs
Tue Dec 21 17:09:25 2010 UTC (13 months, 2 weeks ago) by kensmith
Branches: RELENG_8_2
CVS tags: RELENG_8_2_0_RELEASE
Diff to: previous 1.62.2.3: preferred, colored; next MAIN 1.62.2.4: preferred, colored
Changes since revision 1.62.2.3: +0 -0 lines
SVN rev 216617 on 2010-12-21 17:09:25Z by kensmith

Copy stable/8 to releng/8.2 in preparation for FreeBSD-8.2 release.

Approved by:	re (implicit)

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sat Dec 11 08:32:16 2010 UTC (13 months, 4 weeks ago) by joel
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +0 -4 lines
SVN rev 216370 on 2010-12-11 08:32:16Z by joel

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

Revision 1.69: download - view: text, markup, annotated - select for diffs
Thu Dec 2 01:46:06 2010 UTC (14 months, 1 week ago) by kevlo
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +1 -1 lines
SVN rev 216106 on 2010-12-02 01:46:06Z by kevlo

Don't error out while searching for empty directories.

Submitted by:	Bakul Shah <bakul at bitblocks dot com>

Revision 1.62.2.3.2.1: download - view: text, markup, annotated - select for diffs
Mon Jun 14 02:09:06 2010 UTC (19 months, 3 weeks ago) by kensmith
Branches: RELENG_8_1
CVS tags: RELENG_8_1_0_RELEASE
Diff to: previous 1.62.2.3: preferred, colored; next MAIN 1.62.2.4: preferred, colored
Changes since revision 1.62.2.3: +0 -0 lines
SVN rev 209145 on 2010-06-14 02:09:06Z by kensmith

Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.

Approved by:	re (implicit)

Revision 1.68: download - view: text, markup, annotated - select for diffs
Thu May 6 17:06:36 2010 UTC (21 months ago) by delphij
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +6 -2 lines
SVN rev 207705 on 2010-05-06 17:06:36Z by delphij

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

Pointed out by:	bde
Pointy hat to:	delphij

Revision 1.67: download - view: text, markup, annotated - select for diffs
Wed May 5 21:24:18 2010 UTC (21 months ago) by delphij
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +2 -6 lines
SVN rev 207677 on 2010-05-05 21:24:18Z by delphij

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

Revision 1.58.2.3: download - view: text, markup, annotated - select for diffs
Wed Mar 17 20:17:25 2010 UTC (22 months, 3 weeks ago) by gavin
Branches: RELENG_7
CVS tags: RELENG_7_4_BP
Branch point for: RELENG_7_4
Diff to: previous 1.58.2.2: preferred, colored; branchpoint 1.58: preferred, colored
Changes since revision 1.58.2.2: +2 -0 lines
SVN rev 205257 on 2010-03-17 20:17:25Z by gavin

Merge r203865 from head:

  The -newerXB option was being interpreted the same as the -newerXm option
  as a check for F_TIME2_B was missing.  Fix this.

PR:		bin/138245
Submitted by:	"David E. Cross"  <crossd cs.rpi.edu>

Revision 1.62.2.3: download - view: text, markup, annotated - select for diffs
Wed Mar 17 20:16:28 2010 UTC (22 months, 3 weeks ago) by gavin
Branches: RELENG_8
CVS tags: RELENG_8_2_BP, RELENG_8_1_BP
Branch point for: RELENG_8_2, RELENG_8_1
Diff to: previous 1.62.2.2: preferred, colored; branchpoint 1.62: preferred, colored
Changes since revision 1.62.2.2: +2 -0 lines
SVN rev 205256 on 2010-03-17 20:16:28Z by gavin

Merge r203865 from head:

  The -newerXB option was being interpreted the same as the -newerXm option
  as a check for F_TIME2_B was missing.  Fix this.

PR:		bin/138245
Submitted by:	"David E. Cross"  <crossd cs.rpi.edu>

Revision 1.66: download - view: text, markup, annotated - select for diffs
Sun Feb 14 12:08:44 2010 UTC (23 months, 3 weeks ago) by gavin
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +2 -0 lines
SVN rev 203865 on 2010-02-14 12:08:44Z by gavin

The -newerXB option was being interpreted the same as the -newerXm option
as a check for F_TIME2_B was missing.  Fix this.

PR:		bin/138245
Submitted by:	"David E. Cross"  <crossd cs.rpi.edu>
MFC after:	1 month

Revision 1.58.2.2.2.1: download - view: text, markup, annotated - select for diffs
Wed Feb 10 00:26:20 2010 UTC (23 months, 4 weeks ago) by kensmith
Branches: RELENG_7_3
CVS tags: RELENG_7_3_0_RELEASE
Diff to: previous 1.58.2.2: preferred, colored; next MAIN 1.58.2.3: preferred, colored
Changes since revision 1.58.2.2: +0 -0 lines
SVN rev 203736 on 2010-02-10 00:26:20Z by kensmith

Copy stable/7 to releng/7.3 as part of the 7.3-RELEASE process.

Approved by:	re (implicit)

Revision 1.65: download - view: text, markup, annotated - select for diffs
Tue Feb 9 21:24:41 2010 UTC (23 months, 4 weeks ago) by ed
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +1 -2 lines
SVN rev 203723 on 2010-02-09 21:24:41Z by ed

Don't let find(1) depend on struct timeb.

This structure is deprecated and only used by ftime(2), which is part of
libcompat. The second argument of get_date() is unused, which means we
can just remove it entirely.

Revision 1.62.2.2: download - view: text, markup, annotated - select for diffs
Sat Jan 30 14:54:12 2010 UTC (2 years ago) by trasz
Branches: RELENG_8
Diff to: previous 1.62.2.1: preferred, colored; branchpoint 1.62: preferred, colored
Changes since revision 1.62.2.1: +35 -25 lines
SVN rev 203191 on 2010-01-30 14:54:12Z by trasz

MFC r196839:

Add NFSv4 ACL support to find(1).

Revision 1.64: download - view: text, markup, annotated - select for diffs
Tue Dec 29 22:53:27 2009 UTC (2 years, 1 month ago) by ed
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +1 -1 lines
SVN rev 201227 on 2009-12-29 22:53:27Z by ed

ANSIfy almost all applications that use WARNS=6.

I was considering committing all these patches one by one, but as
discussed with brooks@, there is no need to do this. If we ever
need/want to merge these changes back, it is still possible to do this
per application.

Revision 1.62.2.1.2.1: download - view: text, markup, annotated - select for diffs
Sun Oct 25 01:10:29 2009 UTC (2 years, 3 months ago) by kensmith
Branches: RELENG_8_0
CVS tags: RELENG_8_0_0_RELEASE
Diff to: previous 1.62.2.1: preferred, colored; next MAIN 1.62.2.2: preferred, colored
Changes since revision 1.62.2.1: +0 -0 lines
SVN rev 198460 on 2009-10-25 01:10:29Z by kensmith

Copy stable/8 to releng/8.0 as part of 8.0-RELEASE release procedure.

Approved by:	re (implicit)

Revision 1.63: download - view: text, markup, annotated - select for diffs
Fri Sep 4 20:01:16 2009 UTC (2 years, 5 months ago) by trasz
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +35 -25 lines
SVN rev 196839 on 2009-09-04 20:01:16Z by trasz

Add NFSv4 ACL support to find(1).

Reviewed by:	rwatson

Revision 1.62.2.1: download - view: text, markup, annotated - select for diffs
Mon Aug 3 08:13:06 2009 UTC (2 years, 6 months ago) by kensmith
Branches: RELENG_8
CVS tags: RELENG_8_0_BP
Branch point for: RELENG_8_0
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +0 -0 lines
SVN rev 196045 on 2009-08-03 08:13:06Z by kensmith

Copy head to stable/8 as part of 8.0 Release cycle.

Approved by:	re (Implicit)

Revision 1.58.2.2: download - view: text, markup, annotated - select for diffs
Sun Jun 21 15:40:39 2009 UTC (2 years, 7 months ago) by jilles
Branches: RELENG_7
CVS tags: RELENG_7_3_BP
Branch point for: RELENG_7_3
Diff to: previous 1.58.2.1: preferred, colored; branchpoint 1.58: preferred, colored
Changes since revision 1.58.2.1: +1 -1 lines
SVN rev 194588 on 2009-06-21 15:40:39Z by jilles

MFC r193087: rm, find -delete: fix removing symlinks with uchg/uappnd set

Formerly, this tried to clear the flags on the symlink's target
instead of the symlink itself.

As before, this only happens for root or for the unlink(1) variant of rm.

PR:		bin/111226 (part of)
Submitted by:	Martin Kammerhofer
Approved by:	ed (mentor) (implicit)

Revision 1.58.2.1: download - view: text, markup, annotated - select for diffs
Thu Jun 11 18:32:53 2009 UTC (2 years, 7 months ago) by avg
Branches: RELENG_7
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +5 -5 lines
SVN rev 194035 on 2009-06-11 18:32:53Z by avg

MFC r192381: find: do not silently disable -L when -delete is used

Approved by:	jhb (mentor)

Revision 1.62: download - view: text, markup, annotated - select for diffs
Sat May 30 10:42:37 2009 UTC (2 years, 8 months ago) by jilles
Branches: MAIN
CVS tags: RELENG_8_BP
Branch point for: RELENG_8
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +1 -1 lines
SVN rev 193087 on 2009-05-30 10:42:37Z by jilles

rm, find -delete: fix removing symlinks with uchg/uappnd set.

Formerly, this tried to clear the flags on the symlink's target
instead of the symlink itself.

As before, this only happens for root or for the unlink(1) variant of rm.

PR:		bin/111226 (part of)
Submitted by:	Martin Kammerhofer
Approved by:	ed (mentor)
MFC after:	3 weeks

Revision 1.61: download - view: text, markup, annotated - select for diffs
Tue May 19 14:23:54 2009 UTC (2 years, 8 months ago) by avg
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +5 -5 lines
SVN rev 192381 on 2009-05-19 14:23:54Z by avg

find: do not silently disable -L when -delete is used

First of all, current behavior is not documented and confusing,
and it can be very dangerous in the following sequence:
find -L . -type l
find -L . -type l -delete
(the second line is even suggested by find(1)).

Instead simply refuse to proceed when -L and -delete are both used.
A descriptive error message is provided.
The following command can be safely used to remove broken links:
find -L . -type l -print0 | xargs rm -0

To do:		update find(1)
PR:		bin/90687
Obtained from:	Anatoli Klassen <anatoli@aksoft.net>
Approved by:	jhb (mentor)

Revision 1.58.8.1: download - view: text, markup, annotated - select for diffs
Wed Apr 15 03:14:26 2009 UTC (2 years, 9 months ago) by kensmith
Branches: RELENG_7_2
CVS tags: RELENG_7_2_0_RELEASE
Diff to: previous 1.58: preferred, colored; next MAIN 1.59: preferred, colored
Changes since revision 1.58: +0 -0 lines
SVN rev 191087 on 2009-04-15 03:14:26Z by kensmith

Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.

Approved by:	re (implicit)

Revision 1.58.6.1: download - view: text, markup, annotated - select for diffs
Tue Nov 25 02:59:29 2008 UTC (3 years, 2 months ago) by kensmith
Branches: RELENG_7_1
CVS tags: RELENG_7_1_0_RELEASE
Diff to: previous 1.58: preferred, colored; next MAIN 1.59: preferred, colored
Changes since revision 1.58: +0 -0 lines
SVN rev 185281 on 2008-11-25 02:59:29Z by kensmith

Create releng/7.1 in preparation for moving into RC phase of 7.1 release
cycle.

Approved by:	re (implicit)

Revision 1.53.2.4.6.1: download - view: text, markup, annotated - select for diffs
Thu Oct 2 02:57:24 2008 UTC (3 years, 4 months ago) by kensmith
Branches: RELENG_6_4
CVS tags: RELENG_6_4_0_RELEASE
Diff to: previous 1.53.2.4: preferred, colored; next MAIN 1.54: preferred, colored
Changes since revision 1.53.2.4: +0 -0 lines
SVN rev 183531 on 2008-10-02 02:57:24Z by kensmith

Create releng/6.4 from stable/6 in preparation for 6.4-RC1.

Approved by:	re (implicit)

Revision 1.60: download - view: text, markup, annotated - select for diffs
Sun Feb 24 00:01:06 2008 UTC (3 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +10 -5 lines
The matching in -lname and -ilname are on the contents of the link
itself, not on the type of the file.  As such, do a readlink to get
the symbolic link's contents and fail to match if the path isn't a
symbolic link.

Pointed out by: des@

Revision 1.59: download - view: text, markup, annotated - select for diffs
Sat Feb 23 16:29:04 2008 UTC (3 years, 11 months ago) by imp
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +57 -3 lines
Implement a number of primaries present in GNU find, but not present
in our find.

The following are nops because they aren't relevant to our find:
	-ignore_readdir_race
	-noignore_readdir_race
	-noleaf
The following aliaes were created:
	-gid -> -group		[2]
	-uid -> -user		[2]
	-wholename -> -path
	-iwholename -> ipath
	-mount -> -xdev
	-d -> -depth		[1]
The following new primaries were created:
	-lname	like -name, but matches symbolic links only)
	-ilname like -lname but case insensitive
	-quit	exit(0)
	-samefile returns true for hard links to the specified file
	-true	Always true
I changed one primary to match GNU find since I think our use of it violates
POLA
	-false	Always false (was an alias for -not!)

Also, document the '+' modifier for -execdir, as well as all of the above.
This was previously implemented.

Document the remaining 7 primaries that are in GNU find, but aren't yet
implemented in find(1)

[1] This was done in GNU find for compatibility with FreeBSD, yet they
mixed up command line args and primary args.

[2] -uid/-gid in GNU find ONLY takes a numeric arg, but that arg does the
normal range thing that.  GNU find -user and -uid also take a numberic arg,
but don't do the range processing.  find(1) does both for -user and -group,
so making -uid and -gid aliases is compatible for all non-error cases used
in GNU find.  While not perfect emulation, this seems a reasonable thing
for us.

Revision 1.53.2.4: download - view: text, markup, annotated - select for diffs
Thu Jun 1 20:35:20 2006 UTC (5 years, 8 months ago) by krion
Branches: RELENG_6
CVS tags: RELENG_6_4_BP, RELENG_6_3_BP, RELENG_6_3_0_RELEASE, RELENG_6_3, RELENG_6_2_BP, RELENG_6_2_0_RELEASE, RELENG_6_2
Branch point for: RELENG_6_4
Diff to: previous 1.53.2.3: preferred, colored; branchpoint 1.53: preferred, colored; next MAIN 1.54: preferred, colored
Changes since revision 1.53.2.3: +35 -3 lines
MFC: function.c: 1.58; find.1: 1.77

  date: 2006/05/27 18:27:41;  author: krion;  state: Exp;  lines: +35 -3
  Add the capability for a trailing scale indicator to cause the
  specified size to be read in the more familiar units of kilobytes,
  megabytes, gigabytes, terabytes and petabytes.

  PR:             bin/50988
  Submitted by:   Matthew Seaman <m.seaman@infracaninophile.co.uk>

Revision 1.53.2.3: download - view: text, markup, annotated - select for diffs
Thu Jun 1 19:58:01 2006 UTC (5 years, 8 months ago) by krion
Branches: RELENG_6
Diff to: previous 1.53.2.2: preferred, colored; branchpoint 1.53: preferred, colored
Changes since revision 1.53.2.2: +12 -4 lines
MFC: function.c: 1.57

  date: 2006/05/25 21:20:43;  author: krion;  state: Exp;  lines: +12 -4
  Enable numeric arguments and +/- prefixes with -user (-group)
  options.

  PR:             bin/71513
  Submitted by:   Andre Albsmeier <Andre.Albsmeier@siemens.com>

Revision 1.58: download - view: text, markup, annotated - select for diffs
Sat May 27 18:27:41 2006 UTC (5 years, 8 months ago) by krion
Branches: MAIN
CVS tags: RELENG_7_BP, RELENG_7_2_BP, RELENG_7_1_BP, RELENG_7_0_BP, RELENG_7_0_0_RELEASE, RELENG_7_0
Branch point for: RELENG_7_2, RELENG_7_1, RELENG_7
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +35 -3 lines
Add the capability for a trailing scale indicator to cause the
specified size to be read in the more familiar units of kilobytes,
megabytes, gigabytes, terabytes and petabytes.

PR:		bin/50988
Submitted by:	Matthew Seaman <m.seaman@infracaninophile.co.uk>
MFC after:	7 days

Revision 1.57: download - view: text, markup, annotated - select for diffs
Thu May 25 21:20:43 2006 UTC (5 years, 8 months ago) by krion
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +12 -4 lines
Enable numeric arguments and +/- prefixes with -user (-group)
options.

PR:		bin/71513
Submitted by:	Andre Albsmeier <Andre.Albsmeier@siemens.com>
MFC after:	7 days

Revision 1.53.2.2: download - view: text, markup, annotated - select for diffs
Sun May 21 07:34:58 2006 UTC (5 years, 8 months ago) by krion
Branches: RELENG_6
Diff to: previous 1.53.2.1: preferred, colored; branchpoint 1.53: preferred, colored
Changes since revision 1.53.2.1: +17 -0 lines
MFC: extern.h: 1.23, find.c: 1.18, find.h: 1.19, function.c: 1.56

  date: 2006/05/14 20:23:00;  author: krion;  state: Exp;  lines: +1 -4
  The last execution of -exec {} + is not done if the -exec primary is
  not on the top-level -and sequence, e.g. inside of ! or -or.

  Create a separate linked list of all active -exec {} + primaries and
  do the last execution for all at termination.

  PR:             bin/79263
  Submitted by:   Jilles Tjoelker <jilles@stack.nl>

Revision 1.53.2.1: download - view: text, markup, annotated - select for diffs
Sun May 14 21:45:54 2006 UTC (5 years, 8 months ago) by ceri
Branches: RELENG_6
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +13 -4 lines
MFC the birthtime related primaries.

Revision 1.56: download - view: text, markup, annotated - select for diffs
Sun May 14 20:23:01 2006 UTC (5 years, 8 months ago) by krion
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +17 -0 lines
The last execution of -exec {} + is not done if the -exec primary is
not on the top-level -and sequence, e.g. inside of ! or -or.

Create a separate linked list of all active -exec {} + primaries and
do the last execution for all at termination.

PR:		bin/79263
Submitted by:	Jilles Tjoelker <jilles@stack.nl>
MFC after:	7 days

Revision 1.55: download - view: text, markup, annotated - select for diffs
Mon Apr 3 20:36:37 2006 UTC (5 years, 10 months ago) by ceri
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +13 -4 lines
Add -Btime, -Bnewer, -Bmin, -newerB[Bacmt], -newer[acmt]B options to
work with the st_birthtime field of struct stat.

'B' has been chosen to match the format specifier from stat(1).

Approved by:	jhb
MFC after:	2 weeks

Revision 1.54: download - view: text, markup, annotated - select for diffs
Thu Aug 25 13:44:02 2005 UTC (6 years, 5 months ago) by roberto
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +1 -1 lines
Fixes for gcc4.x.

Submitted by:   Divacky Roman <xdivac02@stud.fit.vutbr.cz>
PR:             bin/84991

Revision 1.53: download - view: text, markup, annotated - select for diffs
Tue Jan 25 14:07:25 2005 UTC (7 years ago) by ssouhlal
Branches: MAIN
CVS tags: RELENG_6_BP, RELENG_6_1_BP, RELENG_6_1_0_RELEASE, RELENG_6_1, RELENG_6_0_BP, RELENG_6_0_0_RELEASE, RELENG_6_0
Branch point for: RELENG_6
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +2 -2 lines
- Make find(1) WARNS?= 6 clean
- Bump to WARNS?= 6

Approved by:	stefanf, grehan (mentor)

Revision 1.52: download - view: text, markup, annotated - select for diffs
Thu Jul 29 03:33:55 2004 UTC (7 years, 6 months ago) by tjr
Branches: MAIN
CVS tags: RELENG_5_BP, RELENG_5_5_BP, RELENG_5_5_0_RELEASE, RELENG_5_5, RELENG_5_4_BP, RELENG_5_4_0_RELEASE, RELENG_5_4, RELENG_5_3_BP, RELENG_5_3_0_RELEASE, RELENG_5_3, RELENG_5
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +1 -1 lines
Change the 'no terminating ";"' error message to 'no terminating ";" or "+"'
since + is also a valid way to terminate -exec.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Thu Jul 29 03:29:44 2004 UTC (7 years, 6 months ago) by tjr
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +0 -2 lines
Remove partial support for building this on NetBSD.

Revision 1.22.2.12: download - view: text, markup, annotated - select for diffs
Fri Jun 11 09:40:17 2004 UTC (7 years, 8 months ago) by eik
Branches: RELENG_4
CVS tags: RELENG_4_11_BP, RELENG_4_11_0_RELEASE, RELENG_4_11
Diff to: previous 1.22.2.11: preferred, colored; branchpoint 1.22: preferred, colored; next MAIN 1.23: preferred, colored
Changes since revision 1.22.2.11: +49 -7 lines
MFC of the `-depth n' primary and the -maxdepth fix.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Fri May 28 17:17:15 2004 UTC (7 years, 8 months ago) by eik
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +47 -7 lines
- introduce a new primary `-depth n', which tests whether
  the depth of the current file relative to the starting
  point of the traversal is n. The usual +/- modifiers
  to the argument apply.

- while I'm here, fix -maxdepth in the case of a depth-first
  traversal

Print the top ten maintainers of python module ports
(works with p5-* too):

find /usr/ports -depth 2 \! -name 'py-*' -prune -o \
  -depth 3 -name Makefile -execdir make -VMAINTAINER \; \
  | sort | uniq -c | sort -nr | head

PR:		66667
Reviewed by:	ru, joerg
Approved by:	joerg
MFC after:	2 weeks

Revision 1.49: download - view: text, markup, annotated - select for diffs
Sat Apr 3 17:10:04 2004 UTC (7 years, 10 months ago) by bmilekic
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +51 -0 lines
Give find(1) the option -acl to locate files with extended
ACLs.  This is similar to what ls(1) can do.  It is handy to
have it so that it can be used in conjunction with
"-exec setfacl {} \;" (to find(1)), among others.

This is the submitter's patch, but slightly modified.

PR: bin/65016
Submitted by: Christian S.J. Peron <maneo@bsdpro.com>

Revision 1.48: download - view: text, markup, annotated - select for diffs
Sat Jun 14 13:00:21 2003 UTC (8 years, 7 months ago) by markm
Branches: MAIN
CVS tags: RELENG_5_2_BP, RELENG_5_2_1_RELEASE, RELENG_5_2_0_RELEASE, RELENG_5_2
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +62 -190 lines
Fix all WARNS.  Checked with "make WARNS=9". Remove unused file.

Revision 1.22.2.11: download - view: text, markup, annotated - select for diffs
Fri Nov 15 11:38:15 2002 UTC (9 years, 2 months ago) by sheldonh
Branches: RELENG_4
CVS tags: RELENG_4_9_BP, RELENG_4_9_0_RELEASE, RELENG_4_9, RELENG_4_8_BP, RELENG_4_8_0_RELEASE, RELENG_4_8, RELENG_4_10_BP, RELENG_4_10_0_RELEASE, RELENG_4_10
Diff to: previous 1.22.2.10: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.10: +104 -12 lines
MFC: allow time units in arguments to -[acm]time options

	rev 1.39	src/usr.bin/find/find.1
	rev 1.13	src/usr.bin/find/find.h
	rev 1.34	src/usr.bin/find/function.c

Revision 1.47: download - view: text, markup, annotated - select for diffs
Sat Aug 10 20:19:03 2002 UTC (9 years, 6 months ago) by mux
Branches: MAIN
CVS tags: RELENG_5_1_BP, RELENG_5_1_0_RELEASE, RELENG_5_1, RELENG_5_0_BP, RELENG_5_0_0_RELEASE, RELENG_5_0
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +1 -1 lines
- Introduce a new struct xvfsconf, the userland version of struct vfsconf.
- Make getvfsbyname() take a struct xvfsconf *.
- Convert several consumers of getvfsbyname() to use struct xvfsconf.
- Correct the getvfsbyname.3 manpage.
- Create a new vfs.conflist sysctl to dump all the struct xvfsconf in the
  kernel, and rewrite getvfsbyname() to use this instead of the weird
  existing API.
- Convert some {set,get,end}vfsent() consumers to use the new vfs.conflist
  sysctl.
- Convert a vfsload() call in nfsiod.c to kldload() and remove the useless
  vfsisloadable() and endvfsent() calls.
- Add a warning printf() in vfs_sysctl() to tell people they are using
  an old userland.

After these changes, it's possible to modify struct vfsconf without
breaking the binary compatibility.  Please note that these changes don't
break this compatibility either.

When bp will have updated mount_smbfs(8) with the patch I sent him, there
will be no more consumers of the {set,get,end}vfsent(), vfsisloadable()
and vfsload() API, and I will promptly delete it.

Revision 1.46: download - view: text, markup, annotated - select for diffs
Sat Jul 13 08:08:46 2002 UTC (9 years, 7 months ago) by tjr
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +12 -8 lines
Account for space used by environment variables in a similar way to
xargs(1) when handling -exec ... {} + constructions.

Revision 1.45: download - view: text, markup, annotated - select for diffs
Sun Jun 2 12:57:41 2002 UTC (9 years, 8 months ago) by tjr
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +69 -8 lines
Support the SysV-style -exec utility args.. {} + function, required by
SUSv3. This is similar to find foo -print0 | xargs -0 utility args.

Revision 1.44: download - view: text, markup, annotated - select for diffs
Fri May 17 05:10:59 2002 UTC (9 years, 8 months ago) by jmallett
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +9 -9 lines
Clean up malloc(3)'s argument.  Remove casts which do nothing when we're
using sizeof() anyway.  Use slightly more consistent (per-file) error
reporting for malloc(3) returning NULL.  If "malloc failed" was being printed,
don't use err(3).  If a NULL format is being used, use err(3).  In one case
errx(3) was being used with strerror(3), so just use err(3).

Revision 1.43: download - view: text, markup, annotated - select for diffs
Thu May 16 02:19:04 2002 UTC (9 years, 8 months ago) by trhodes
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +1 -1 lines
More consistancy.  file system > filesystem

Revision 1.22.2.10: download - view: text, markup, annotated - select for diffs
Thu Apr 4 08:54:15 2002 UTC (9 years, 10 months ago) by jmallett
Branches: RELENG_4
CVS tags: RELENG_4_7_BP, RELENG_4_7_0_RELEASE, RELENG_4_7, RELENG_4_6_BP, RELENG_4_6_2_RELEASE, RELENG_4_6_1_RELEASE, RELENG_4_6_0_RELEASE, RELENG_4_6
Diff to: previous 1.22.2.9: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.9: +4 -1 lines
MFC:
  Fix find -exec with no command specified (i.e.: find . -exec ';')

  Revision  Changes    Path
  1.41      +3 -0      src/usr.bin/find/function.c

Revision 1.42: download - view: text, markup, annotated - select for diffs
Tue Apr 2 10:45:34 2002 UTC (9 years, 10 months ago) by markm
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +1 -1 lines
There is breakage in parsedate, so revert to get_date until this can be
resolved.

Reported by:	paul

Revision 1.41: download - view: text, markup, annotated - select for diffs
Tue Apr 2 07:20:56 2002 UTC (9 years, 10 months ago) by jmallett
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +3 -0 lines
Fix find -exec with no command specified (i.e.: find . -exec ';')

PR:		bin/36521
Submitted by:	Simon 'corecode' Schubert <corecode@corecode.ath.cx>
Reviewed by:	mike
MFC after:	3 days

Revision 1.40: download - view: text, markup, annotated - select for diffs
Mon Apr 1 22:56:56 2002 UTC (9 years, 10 months ago) by obrien
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -3 lines
Fix SCM IDs.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Tue Mar 26 12:05:34 2002 UTC (9 years, 10 months ago) by charnier
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -3 lines
spelling

Revision 1.38: download - view: text, markup, annotated - select for diffs
Thu Mar 21 21:56:05 2002 UTC (9 years, 10 months ago) by markm
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +1 -2 lines
Restructure for own parsedate (replacement for get_date from CVS).

Fix up parsedate.y for WARNS=4.

Reviewd by:	bde (except for parsedate.y diffs)

Revision 1.37: download - view: text, markup, annotated - select for diffs
Wed Mar 20 10:32:05 2002 UTC (9 years, 10 months ago) by markm
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +5 -5 lines
Remove __P().

Revision 1.36: download - view: text, markup, annotated - select for diffs
Wed Feb 27 17:57:00 2002 UTC (9 years, 11 months ago) by dwmalone
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +47 -41 lines
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.

Revision 1.22.2.9: download - view: text, markup, annotated - select for diffs
Wed Sep 19 09:44:24 2001 UTC (10 years, 4 months ago) by ru
Branches: RELENG_4
CVS tags: RELENG_4_5_BP, RELENG_4_5_0_RELEASE, RELENG_4_5
Diff to: previous 1.22.2.8: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.8: +13 -10 lines
MFC: Fix and extend the implementation of -flags.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Fri Sep 14 13:42:26 2001 UTC (10 years, 4 months ago) by ru
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +13 -26 lines
Simplify f_Xtime().

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Sep 14 12:47:13 2001 UTC (10 years, 4 months ago) by ru
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +105 -13 lines
Bloat find(1) even more, and introduce the concept
of time units to be used with -[acm]time primaries.

Based on patch from Nils M Holm <nmh@t3x.org>.

PR:		bin/29165, bin/30309

Revision 1.33: download - view: text, markup, annotated - select for diffs
Tue Sep 4 16:09:01 2001 UTC (10 years, 5 months ago) by ru
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +13 -10 lines
The implementation of -flags was broken and did not match the (poorly)
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

Revision 1.22.2.8: download - view: text, markup, annotated - select for diffs
Thu Aug 30 17:54:36 2001 UTC (10 years, 5 months ago) by ru
Branches: RELENG_4
CVS tags: RELENG_4_4_BP, RELENG_4_4_0_RELEASE, RELENG_4_4
Diff to: previous 1.22.2.7: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.7: +3 -3 lines
MFC: 1.32: Restore the `-perm +mode' feature.

Approved by:	jkh

Revision 1.32: download - view: text, markup, annotated - select for diffs
Thu Aug 30 13:17:58 2001 UTC (10 years, 5 months ago) by ru
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -3 lines
Restore the `-perm +mode' feature.

Broken in the "close a PR" race, in revision 1.30.
Note that the patch in the PR did not have this bug!

Revision 1.31: download - view: text, markup, annotated - select for diffs
Tue Jul 24 14:12:05 2001 UTC (10 years, 6 months ago) by obrien
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +10 -5 lines
Remove emalloc and expand to the malloc + error checking it was, where used.

Revision 1.22.2.7: download - view: text, markup, annotated - select for diffs
Sun May 6 09:53:22 2001 UTC (10 years, 9 months ago) by phk
Branches: RELENG_4
Diff to: previous 1.22.2.6: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.6: +536 -752 lines
MFC: bring in sync with current.

Revision 1.30: download - view: text, markup, annotated - select for diffs
Thu May 3 18:05:34 2001 UTC (10 years, 9 months ago) by phk
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +539 -761 lines
 They add the following commands:
   -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>

Revision 1.22.2.6: download - view: text, markup, annotated - select for diffs
Sun Feb 25 21:56:59 2001 UTC (10 years, 11 months ago) by knu
Branches: RELENG_4
CVS tags: RELENG_4_3_BP, RELENG_4_3_0_RELEASE, RELENG_4_3
Diff to: previous 1.22.2.5: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.5: +156 -2 lines
MFC:
	Add -E, -iname, -ipath, -regex, and -iregex.

Revision 1.29: download - view: text, markup, annotated - select for diffs
Fri Feb 23 16:20:55 2001 UTC (10 years, 11 months ago) by knu
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +156 -2 lines
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

Revision 1.22.2.5: download - view: text, markup, annotated - select for diffs
Tue Jan 30 14:45:02 2001 UTC (11 years ago) by peter
Branches: RELENG_4
Diff to: previous 1.22.2.4: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.4: +44 -1 lines
MFC: -empty switch for searching for empty directories.  (From OpenBSD)

Revision 1.28: download - view: text, markup, annotated - select for diffs
Tue Jan 23 11:16:50 2001 UTC (11 years ago) by peter
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +44 -1 lines
Add the -empty flag, from OpenBSD.  It returns true if the directory
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

Revision 1.27: download - view: text, markup, annotated - select for diffs
Fri Jul 28 20:02:42 2000 UTC (11 years, 6 months ago) by eivind
Branches: MAIN
CVS tags: PRE_SMPNG
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +17 -3 lines
Make passing unknown fstypes to -fstype result in a warning instead of
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.

Revision 1.22.2.4: download - view: text, markup, annotated - select for diffs
Wed Jun 28 02:33:16 2000 UTC (11 years, 7 months ago) by joe
Branches: RELENG_4
CVS tags: RELENG_4_2_0_RELEASE, RELENG_4_1_1_RELEASE, RELENG_4_1_0_RELEASE
Diff to: previous 1.22.2.3: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.3: +2 -4 lines
MFC: Use the new fflagstostr and strtofflags functions in libc.

Revision 1.22.2.3: download - view: text, markup, annotated - select for diffs
Fri Jun 23 18:45:41 2000 UTC (11 years, 7 months ago) by roberto
Branches: RELENG_4
Diff to: previous 1.22.2.2: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.2: +1 -5 lines
MFC:	makes the code -Wall -Wmissing-prototype clean.

Revision 1.22.2.2: download - view: text, markup, annotated - select for diffs
Fri Jun 23 18:38:46 2000 UTC (11 years, 7 months ago) by roberto
Branches: RELENG_4
Diff to: previous 1.22.2.1: preferred, colored; branchpoint 1.22: preferred, colored
Changes since revision 1.22.2.1: +67 -5 lines
MFC:  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.

PR:	bin/18941

Revision 1.22.2.1: download - view: text, markup, annotated - select for diffs
Fri Jun 23 17:45:22 2000 UTC (11 years, 7 months ago) by roberto
Branches: RELENG_4
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +6 -1 lines
MFC:
          The find -perm option currently supports an exact match,
          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

Revision 1.26: download - view: text, markup, annotated - select for diffs
Sat Jun 17 14:19:33 2000 UTC (11 years, 7 months ago) by joe
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +2 -4 lines
Switch over to using the new fflagstostr and strtofflags library calls.

Revision 1.25: download - view: text, markup, annotated - select for diffs
Wed Jun 14 07:43:52 2000 UTC (11 years, 7 months ago) by roberto
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +1 -5 lines
Make find -Wall -Wredundant-decls clean.

Submitted by:	nrahlstr

Revision 1.24: download - view: text, markup, annotated - select for diffs
Mon Jun 12 11:12:41 2000 UTC (11 years, 8 months ago) by roberto
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +67 -5 lines
    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>

Revision 1.23: download - view: text, markup, annotated - select for diffs
Mon Jun 12 10:36:52 2000 UTC (11 years, 8 months ago) by roberto
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +6 -1 lines
        The find -perm option currently supports an exact match,
        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>

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sat Feb 5 18:42:34 2000 UTC (12 years ago) by joe
Branches: MAIN
CVS tags: RELENG_4_BP, RELENG_4_0_0_RELEASE
Branch point for: RELENG_4
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +3 -1 lines
Revert part of the last commit, remove {g|s}etflags from the libc
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

Revision 1.21: download - view: text, markup, annotated - select for diffs
Thu Jan 27 21:16:56 2000 UTC (12 years ago) by joe
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +2 -4 lines
Historically file flags (schg, uschg, etc) have been converted from
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 ;)

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Dec 19 15:43:18 1999 UTC (12 years, 1 month ago) by roberto
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +58 -1 lines
Second part of bin/3648: add -flags to search for specific flags.
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>

Revision 1.19: download - view: text, markup, annotated - select for diffs
Mon Sep 6 20:21:19 1999 UTC (12 years, 5 months ago) by billf
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +3 -1 lines
-Wall: remove unused variable, initialize variable to avoid gcc stupidity.

Revision 1.18: download - view: text, markup, annotated - select for diffs
Wed Dec 16 04:50:46 1998 UTC (13 years, 1 month ago) by imp
Branches: MAIN
CVS tags: RELENG_3_BP, RELENG_3_5_0_RELEASE, RELENG_3_4_0_RELEASE, RELENG_3_3_0_RELEASE, RELENG_3_2_PAO_BP, RELENG_3_2_PAO, RELENG_3_2_0_RELEASE, RELENG_3_1_0_RELEASE, RELENG_3
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +1 -0 lines
Return memory from setmode.

Obtained from: OpenBSD

Revision 1.17: download - view: text, markup, annotated - select for diffs
Tue Oct 13 14:52:31 1998 UTC (13 years, 4 months ago) by des
Branches: MAIN
CVS tags: RELENG_3_0_0_RELEASE
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +2 -2 lines
Calls one or more of malloc(), warn(), err(), syslog(), execlp() or
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

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat Jan 10 21:36:34 1998 UTC (14 years, 1 month ago) by jb
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +2 -0 lines
A partial frontal lobotomy for find if using the NetBSD libc which
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.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Mon Oct 13 21:06:21 1997 UTC (14 years, 4 months ago) by wosch
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +98 -0 lines
Add the primaries -mmin, -amin, -cmin to find, similar to the GNU find.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Fri Aug 29 23:09:43 1997 UTC (14 years, 5 months ago) by imp
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +100 -0 lines
Add -execdir which will execute the exec command in the dir of the file
in question.  This change and the fts changes should be merged into 2.2-stable
as soon as they are vetted in -current.  This should allow cleaning of files
in /tmp to be reneabled.
Obtained from: OpenBSD

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Mar 27 02:36:26 1997 UTC (14 years, 10 months ago) by peter
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +5 -5 lines
Fix "-fstype local" that was broken by another bugfix in the Lite2 merge.

Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>, PR#3076

Revision 1.12: download - view: text, markup, annotated - select for diffs
Tue Mar 11 13:48:29 1997 UTC (14 years, 11 months ago) by peter
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +30 -41 lines
Merge from Lite2 - use new getvfsbyname() and related changes.
understand whiteouts (FTS_W from fts()).

Revision 1.1.1.2 (vendor branch): download - view: text, markup, annotated - select for diffs
Tue Mar 11 13:05:09 1997 UTC (14 years, 11 months ago) by peter
Branches: CSRG
CVS tags: bsd_44_lite_2
Diff to: previous 1.1.1.1: preferred, colored
Changes since revision 1.1.1.1: +29 -43 lines
Import some parts of CSRG 4.4BSD-Lite2 usr.bin sources to fix tree build.

Revision 1.10.2.1: download - view: text, markup, annotated - select for diffs
Sun Feb 2 18:57:22 1997 UTC (15 years ago) by joerg
Branches: RELENG_2_2
CVS tags: RELENG_2_2_8_RELEASE, RELENG_2_2_7_RELEASE, RELENG_2_2_6_RELEASE, RELENG_2_2_5_RELEASE, RELENG_2_2_2_RELEASE, RELENG_2_2_1_RELEASE, RELENG_2_2_0_RELEASE
Diff to: previous 1.10: preferred, colored; next MAIN 1.11: preferred, colored
Changes since revision 1.10: +4 -7 lines
YAMFC (rev 1.11: fix handling the name "msdos")

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue Jan 28 13:18:46 1997 UTC (15 years ago) by wosch
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +4 -7 lines
The option "fstype" does not handle the argument "msdos" correctly.
This error results from changing the name for the msdos file system
from "pcfs" to "msdos". Close PR #1105

submitted by: Thomas Wintergerst <thomas@lemur.nord.de>,
              Slaven Rezic <eserte@cs.tu-berlin.de>

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sat Oct 5 23:47:07 1996 UTC (15 years, 4 months ago) by peter
Branches: MAIN
CVS tags: RELENG_2_2_BP
Branch point for: RELENG_2_2
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +1 -1 lines
With -delete, don't complain about non-empty directories.  Otherwise
"cd /tmp; find . -mtime +7 -delete" is excessively noisy.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sat Oct 5 18:21:05 1996 UTC (15 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +7 -0 lines
For the -delete option, emulate the behavior of "rm -f" when dealing with
user-immutable files.

Requested by: ache

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Oct 4 12:54:06 1996 UTC (15 years, 4 months ago) by peter
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +53 -0 lines
Implement a -delete option to find.  The code is extremely paranoid and
goes to a fair degree of trouble to enable something like this to
be safe:  cd /tmp && find . -mtime +7 -delete

It removes both files and directories.  It does not attempt to remove
immutable files (an earlier version I showed to a few people did a chflags
and tried to blow away even immutable files.  Too risky..)

It is thought to be safe because it forces the fts(3) driven descent to
only do "minimal risk" stuff.  specifically, -follow is disabled, it does
checking to see that it chdir'ed to the directory it thought it was
going to, it will *not* pass a pathname with a '/' character in it to
unlink(), so it should be totally immune to symlink tree races.  If it runs
into something "fishy", it bails out rather than blunder ahead.. It's better
to do that if somebody is trying to compromise security rather than risk
giving them an opportunity.  Since the unlink()/rmdir() is being called
from within the current working directory during the tree descent, there
are no fork/exec overheads or races.

As a side effect of this paranoia, you cannot do a
"find /somewhere/dir -delete", as the last argument to rmdir() is
"/somewhere/dir", and the checking won't allow it.  Besides, one would use
rm -rf for that case anyway. :-)

Reviewed by: pst (some time ago, but I've removed the immutable file
deletion code that he complained about since he last saw it)

Revision 1.3.4.3: download - view: text, markup, annotated - select for diffs
Tue Jul 2 17:08:40 1996 UTC (15 years, 7 months ago) by bde
Branches: RELENG_2_1_0
CVS tags: RELENG_2_1_7_RELEASE, RELENG_2_1_6_RELEASE, RELENG_2_1_6_1_RELEASE, RELENG_2_1_5_RELEASE
Diff to: previous 1.3.4.2: preferred, colored; branchpoint 1.3: preferred, colored; next MAIN 1.4: preferred, colored
Changes since revision 1.3.4.2: +4 -4 lines
Brought in fix from rev.1.7: use strtoq() instead of strtol() to avoid
overflows.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Apr 7 12:58:13 1996 UTC (15 years, 10 months ago) by bde
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +4 -4 lines
Use strtoq() instead of strtol() so that large inums, and sizes can be
specified.

Not fixed: specification of large uids and gids; silent truncation of
unrepresentable values.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Mon Oct 16 18:32:35 1995 UTC (16 years, 3 months ago) by wollman
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +1 -1 lines
Don't use printf() for simple strings because it is slow.  Closes PR 783.

Submitted by:	Wolfram Schneider <wosch@freebsd.first.gmd.de>

Revision 1.3.4.2: download - view: text, markup, annotated - select for diffs
Mon Oct 9 07:57:35 1995 UTC (16 years, 4 months ago) by davidg
Branches: RELENG_2_1_0
CVS tags: RELENG_2_1_0_RELEASE
Diff to: previous 1.3.4.1: preferred, colored; branchpoint 1.3: preferred, colored
Changes since revision 1.3.4.1: +3 -0 lines
Brought in change from rev 1.5: fflush stdout.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Sep 12 23:15:33 1995 UTC (16 years, 5 months ago) by nate
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +3 -0 lines
Simpler fix to the find bug reported by Terry Lambert <terry@lambert.org>

[ Find to a file vs. to stdout ] produces different output because find
does not flush stdout when doing a -print.

Submitted by:	Jeffrey Hsu <hsu@freefall.freebsd.org>

Revision 1.3.4.1: download - view: text, markup, annotated - select for diffs
Mon Aug 28 11:07:44 1995 UTC (16 years, 5 months ago) by davidg
Branches: RELENG_2_1_0
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -5 lines
Brought in changes from rev 1.4: don't use tzfile.h

Revision 1.4: download - view: text, markup, annotated - select for diffs
Mon Aug 7 19:17:28 1995 UTC (16 years, 6 months ago) by wollman
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +4 -5 lines
Delete bogus referneces to timezone code internal header file `tzfile.h',
which is no longer bogusly installed in /usr/include.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue May 30 06:30:11 1995 UTC (16 years, 8 months ago) by rgrimes
Branches: MAIN
CVS tags: RELENG_2_1_0_BP, RELENG_2_0_5_RELEASE, RELENG_2_0_5_BP, RELENG_2_0_5
Branch point for: RELENG_2_1_0
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +65 -65 lines
Remove trailing whitespace.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue May 9 19:02:05 1995 UTC (16 years, 9 months ago) by wollman
Branches: MAIN
CVS tags: RELENG_2_0_5_ALPHA
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +24 -0 lines
Add GNU-style `-print0' primary.  This exists so that one can safely
do `find some-nasty-expression -print0 | perl -n0e unlink' and have all
the files actuallly get deleted.  (Using `xargs' and `rm' is not safe.)

Revision 1.1.1.1 (vendor branch): download - view: text, markup, annotated - select for diffs
Fri May 27 12:31:10 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: CSRG
CVS tags: bsd_44_lite, RELEASE_2_0, BETA_2_0, ALPHA_2_0
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +0 -0 lines
BSD 4.4 Lite Usr.bin Sources

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri May 27 12:31:09 1994 UTC (17 years, 8 months ago) by rgrimes
Branches: MAIN
Initial revision

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options