GNU bug report logs -
#21712
Suspected bug in find -exec '+'
Previous Next
Reported by: richard.white <at> embedded-expertise.com
Date: Mon, 19 Oct 2015 15:35:02 UTC
Severity: normal
Tags: notabug
Done: Eric Blake <eblake <at> redhat.com>
Bug is archived. No further changes may be made.
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
The find utility supports execution of a nominated command per file found. The command argument list is terminated with a ';' parameter.
The enhanced GNU version specifies an alternative version of the –exec option using a '+' list terminator. This option is provided to support an xargs-like batched execution of the nominated command resulting in greater efficiency.
It seems like find –exec ';' and find –exec '+' do not behave consistently with regard to '{}' argument expansion.
An example:
mkdir /tmp/test
cd /tmp/test
touch a b
find . –type f –exec echo Prefix{}Suffix ';'
è Prefix./bSuffix
è Prefix./aSuffix
find . –exec echo Prefix{}Suffix '+'
è ./b ./a
Is the latter result correct? I would have expected the same result as for the ';' version?
Richard White
Embedded
Expertise
Richard White, Director, <http://www.embedded-expertise.com/> Embedded Expertise Ltd
<mailto:richard.white <at> embedded-expertise.com> richard.white <at> embedded-expertise.com
t: +44 (0) 333 112 8740 m: +44 (0) 7973 393348
[Message part 2 (text/html, inline)]
This bug report was last modified 9 years and 273 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.