bug-coreutils
[Top][All Lists]
Advanced

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

bug#21712: Suspected bug in find -exec '+'


From: Richard White
Subject: bug#21712: Suspected bug in find -exec '+'
Date: Mon, 19 Oct 2015 12:33:34 +0100

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, Embedded Expertise Ltd

address@hidden

t: +44 (0) 333 112 8740  m: +44 (0) 7973 393348

 

 

 


reply via email to

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