Ravi Sir's Cards › AWS
find -exec vs xargs
This comparison card contrasts find -exec and xargs. find -exec is described as part of find. xargs is described as separate command in a pipe. The card pairs find -exec with simple actions, and xargs with parallel or complex.
Read card text
What this card says
Shape
find -exec
Part of find.
xargs
Separate command in a pipe.
Key points
{} + batches files.
-P parallel, -I placement.
Example
find . -exec gzip {} +
Use when
Simple actions.
Parallel or complex.