bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: find -regex -execdir mv... missunderstanding or bug ?


From: alexandre
Subject: Re: find -regex -execdir mv... missunderstanding or bug ?
Date: Tue, 10 May 2011 13:52:50 +0200

On Tue, May 10, 2011 at 09:26:07AM +0100, James Youngman wrote:
> This is a bug: https://savannah.gnu.org/bugs/?29949
> 
> It's fixed in the git sources, but not in any current release.    I'm
> hoping to make a release with the bugfix soon.
> 
> James.

Hello James, thanks for your answer. I thought i missed my registration
procedure to the list and turned to Debian mailing list (french),
followed by a bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626072

... promply closed by the package maintainer with the following
explanation:
--
What happens is this, which matches documented behavior.

1. mv ./TEST01 test
2. find continues its search. The (newly moved) TEST01 directory matches
the regex.
3. The execdir command is evalutated. find changes to the test directory
and runs mv ./TEST01 test.

Using -depth will get the expected behavior.
--

... Makes sense, doesn't it ? It shed light on my missunderstanding of
-execdir, the path construction, and my inhability to imagine the target
could be found by "find" a second time, after it has been moved.

Despite the fact that the use of "-depth" does not give the expected
result (which would be ./test/TEST01) and that the result is not
consistent between my Debian-unstable and my Debian-stable (not to
mention Slackware and other users on debian-ml with Sid), i was happy
with this answer... now yours is reviving my confusion ;p

Best regards,
Alexandre



reply via email to

[Prev in Thread] Current Thread [Next in Thread]