<feed xmlns='http://www.w3.org/2005/Atom'>
<title>busybox-w32/findutils/find.c, branch join2</title>
<subtitle>A mirror of https://github.com/rmyorston/busybox-w32.git
</subtitle>
<id>https://git.lua4.win/busybox-w32/atom?h=join2</id>
<link rel='self' href='https://git.lua4.win/busybox-w32/atom?h=join2'/>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/'/>
<updated>2026-06-22T10:36:43+00:00</updated>
<entry>
<title>Fix the flags for stat (again) (#601)</title>
<updated>2026-06-22T10:36:43+00:00</updated>
<author>
<name>mbartlett21</name>
<email>29034492+mbartlett21@users.noreply.github.com</email>
</author>
<published>2026-06-22T10:36:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b37062304275debaadf71c9f3e5f4e9076f5eda6'/>
<id>urn:sha1:b37062304275debaadf71c9f3e5f4e9076f5eda6</id>
<content type='text'>
* Revert "find: reset stat(2) flags before terminating"

This reverts commit 228ee18fbe8cf408440e7bbe91db4ef201312983.

* test: fix flags for stat with NOFORK

test is a NOFORK applet, so the flags under mingw_stat may not have been
reset before calling it. We have it so it also restores the flags after,
since it could be called in the middle of another applet.

This also needed a way to retrieve the flags, so they are just done
through the return value.

* Add comments about not having to restore flags

Just for future reference

* lineedit: use new flag restoring

* win32: simplify mingw_access calling

Since we now have a way to get the previous flags, mingw_access can be
changed to ignore any stat flags

* stat: comments from PR

Adds 32 bytes.</content>
</entry>
<entry>
<title>find: reset stat(2) flags before terminating</title>
<updated>2026-06-19T18:13:54+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2026-06-19T18:13:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=228ee18fbe8cf408440e7bbe91db4ef201312983'/>
<id>urn:sha1:228ee18fbe8cf408440e7bbe91db4ef201312983</id>
<content type='text'>
Commit a717c6844 (find: skip check for execute when not needed)
didn't reset stat(2) to its default behaviour (at my insistence).

This was incorrect.  The '-exec cmd {} +' action calls a nofork
'cmd' directly without spawning a new process.  If 'cmd' calls
'stat(2)' it won't be in its default state which can affect the
result.

Reintroduce the code to reset 'stat(2)'.

Adds 16 bytes.

(GitHub PR #600)

Signed-off-by: Ron Yorston &lt;rmy@pobox.com&gt;
</content>
</entry>
<entry>
<title>find: skip check for execute when not needed</title>
<updated>2026-06-19T15:15:35+00:00</updated>
<author>
<name>mbartlett21</name>
<email>mjmouse9999@gmail.com</email>
</author>
<published>2026-06-19T05:41:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=a717c68449c8df642f6f2381618366a24734d184'/>
<id>urn:sha1:a717c68449c8df642f6f2381618366a24734d184</id>
<content type='text'>
See previous commits:
1fb1a65064748a54fba4bf4b5e8700f8e61f003f
6a7ccb6ca3bd9b661760879478ecf0d5f6112fc3

My testing shows a speedup of around 30%, but that will vary with
whether files are cached.

Test inside busybox repository with files cached:
Command                     | before | after
find             &gt;/dev/null |  0.83s | 0.56s
find -executable &gt;/dev/null |  1.56s | 1.35s
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2023-07-13T07:06:26+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2023-07-13T07:06:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=bd978d0256fd3a67de1a7dd54f1a37f9435be363'/>
<id>urn:sha1:bd978d0256fd3a67de1a7dd54f1a37f9435be363</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update applet size estimates</title>
<updated>2023-07-10T15:25:21+00:00</updated>
<author>
<name>Denys Vlasenko</name>
<email>vda.linux@googlemail.com</email>
</author>
<published>2023-07-10T15:25:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=5353df91cba7b397b9407701681708d0a1518df6'/>
<id>urn:sha1:5353df91cba7b397b9407701681708d0a1518df6</id>
<content type='text'>
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'busybox' into merge</title>
<updated>2023-04-09T10:24:09+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2023-04-09T10:24:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=d9f2ea8628452f787e02dd0e496af612a2e94578'/>
<id>urn:sha1:d9f2ea8628452f787e02dd0e496af612a2e94578</id>
<content type='text'>
</content>
</entry>
<entry>
<title>find: implement -ok</title>
<updated>2023-03-28T16:08:02+00:00</updated>
<author>
<name>David Leonard</name>
<email>d+busybox@adaptive-enterprises.com</email>
</author>
<published>2023-01-29T02:07:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=d8a33603801476dd870ea66c36cf7c64d852d674'/>
<id>urn:sha1:d8a33603801476dd870ea66c36cf7c64d852d674</id>
<content type='text'>
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/find.html

  -ok  utility_name  [argument ...] ;
    The -ok primary shall be equivalent to -exec, except that the use
    of a &lt;plus-sign&gt; to punctuate the end of the primary expression
    need not be supported, and find shall request affirmation of the
    invocation of utility_name using the current file as an argument
    by writing to standard error as described in the STDERR section. If
    the response on standard input is affirmative, the utility shall be
    invoked. Otherwise, the command shall not be invoked and the value
    of the -ok operand shall be false.

function                                             old     new   delta
do_exec                                              438     517     +79
parse_params                                        1833    1845     +12
static.params                                        288     292      +4
.rodata                                           100771  100775      +4
packed_usage                                       34543   34541      -2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/1 up/down: 99/-2)              Total: 97 bytes

Signed-off-by: David Leonard &lt;d+busybox@adaptive-enterprises.com&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
<entry>
<title>find: -samefile requires FEATURE_EXTRA_FILE_DATA</title>
<updated>2022-02-09T13:33:37+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2022-02-09T13:33:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=104fd2e186db21df3e93ed5a4db9a7623b70d46f'/>
<id>urn:sha1:104fd2e186db21df3e93ed5a4db9a7623b70d46f</id>
<content type='text'>
Without FEATURE_EXTRA_FILE_DATA we don't have inode numbers to
match so -samefile won't work.
</content>
</entry>
<entry>
<title>Merge busybox into merge</title>
<updated>2021-12-27T08:21:55+00:00</updated>
<author>
<name>Ron Yorston</name>
<email>rmy@pobox.com</email>
</author>
<published>2021-12-27T08:21:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=b15f68214da209b5b293039c09c00f490c0cc193'/>
<id>urn:sha1:b15f68214da209b5b293039c09c00f490c0cc193</id>
<content type='text'>
Fix merge conflict in coreutils/timeout.c.
</content>
</entry>
<entry>
<title>find: implement -samefile</title>
<updated>2021-12-17T20:33:15+00:00</updated>
<author>
<name>Aaro Koskinen</name>
<email>aaro.koskinen@iki.fi</email>
</author>
<published>2021-11-28T10:11:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.lua4.win/busybox-w32/commit/?id=aaade69ce9faac6c05ab8b800fc9e9d4dee8ed54'/>
<id>urn:sha1:aaade69ce9faac6c05ab8b800fc9e9d4dee8ed54</id>
<content type='text'>
function                                             old     new   delta
parse_params                                        1461    1606    +145
func_samefile                                          -      42     +42
packed_usage                                       34079   34102     +23
static.params                                        261     271     +10
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 220/0)             Total: 220 bytes

Signed-off-by: Aaro Koskinen &lt;aaro.koskinen@iki.fi&gt;
Signed-off-by: Denys Vlasenko &lt;vda.linux@googlemail.com&gt;
</content>
</entry>
</feed>
