I couldn't find a solution with find -exec +
or find | xargs
, but GNU Parallel can do the job.
mkdir blah && cd blah touch fooA touch fooB find . -name 'foo*' -print0 | parallel -0 -j1 -X echo {} second
Produces:
./fooA ./fooB second
Note, the -j1
option limits parallel
to one job at a time, which is only used here in an attempt to reproduce the behavior that would have been expected from find -exec +
.