Parallel RM and FIND commands conflicting

Hi all.

Long time!!
Hope you're doing well..

I've stumbled on a peculiar siutaion here, and would expect help from this forum on a clean resolution.

We are running an rm and find command simultaneously from two different Unix sessions of the same user(let's say USER01) and on the same directory (say /tmp/dir01), but with two mutually exclusive search strings which are completely different from each other(commands as follows)

cd /tmp/dir01; rm *STRING01*
find /tmp/dir01 -name "*STRING02*" -type f

Where STRING01 != STRING02

However the find command fails sting that it's not able to find files of *STRING01*

Why is the find command searching for STRING01 instead of STRING02?

Please help.

Regards
Kumarjit

linux: 2.6x
Shell: korn

I do not see why the posted code would fail to find, if the files do exist.
Is the example precisely what you ran? Don't assume, please go back and check.

Hello Jim, thanks for the feedback, but these are the exact commands that were run, and I cannot quote the actual file path/search patterns in this forum.

The find command throws error that its not able to find files matching the search pattern in rm, is what confuses us.

Regards.
Kumarjit

Confirmed, overdone optimization has broken GNU find. If you have SuSE or RHEL you should open a support ticket.
What can help:
Run find with -noleaf.
If that does not help, run an old find from CentOS 5.11, or get the sources of this old version for your system. Still you need the -noleaf option (and there it really helps).