Your message dated Sun, 8 May 2011 19:09:25 +0200
with message-id <[email protected]>
and subject line Re: Bug#626072: findutils: find -regex ... -execdir mv ...
inconsistent behavior
has caused the Debian Bug report #626072,
regarding findutils: find -regex ... -execdir mv ... inconsistent behavior
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
626072: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626072
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: findutils
Version: 4.4.2-1+b1
Severity: important
Tags: sid
Hello, i have the following problem with find:
________________________________________________________________________
$ tree -F --noreport
..
├── test/
└── TEST01
$ find . -regex ".*TEST01" -execdir mv '{}' test \;
$ tree -F --noreport
..
└── test/
└── test
________________________________________________________________________
The expected result would be:
└── test/
└── TEST01
I am not 100% sure this qualify as a bug, nevertheless:
I get the expected result in Squeeze and Slackware 13.37. And following
a discussion on debian-user-french list, at least one person has
confirmed the problem and another gets the expected result, both using
Sid with bash-4.1-3 (debian package). The persone getting the expected
result has the same findutils version as mine, while the person
confirming the problem has findutils 4.5.8-1.
We have not been abble to determine what difference in our systems could
cause the difference in "find" behavior, for the exact same command.
Some things I have tried which does not solve the problem:
1) $ LANG=en find . -regex...
2) run the same command under ZSH.
3) run the same command under a new and clean user account
Workarounds:
$ find . -regex ".*TEST01" -execdir mv -t test '{}' \;
$ find . -maxdepth 1 -regex ".*TEST01" -execdir mv '{}' test \;
Best regards,
Alexandre
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.38-2-686 (SMP w/2 CPU cores)
Locale: LANG=fr_CH.UTF-8, LC_CTYPE=fr_CH.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages findutils depends on:
ii dpkg 1.16.0.3 Debian package management system
ii install-info 4.13a.dfsg.1-6 Manage installed documentation in
ii libc6 2.13-2 Embedded GNU C Library: Shared lib
findutils recommends no packages.
Versions of packages findutils suggests:
ii mlocate 0.23.1-1 quickly find files on the filesyst
-- no debconf information
--- End Message ---
--- Begin Message ---
On 2011-05-08 Alexandre Hoïde <[email protected]> wrote:
> Package: findutils
> Version: 4.4.2-1+b1
> Severity: important
> Tags: sid
> Hello, i have the following problem with find:
> ________________________________________________________________________
> $ tree -F --noreport
> ..
> ├── test/
> └── TEST01
> $ find . -regex ".*TEST01" -execdir mv '{}' test \;
> $ tree -F --noreport
> ..
> └── test/
> └── test
> ________________________________________________________________________
> The expected result would be:
> └── test/
> └── TEST01
> I am not 100% sure this qualify as a bug, nevertheless:
[...]
Hello,
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.
cu andreas
--- End Message ---