This article provides usage examples of the xargs linux/unix utility.
xargs is a linux/unix command line utility that reads items from the standard input, delimited by blanks or newlines, and executes a command on each item.
The following are usage examples that show the different ways xargs can be used.
find /path -name *.log | xargs cat
find /path -name *.log | xargs -I% cp % /tmp/
The -I replace-str option causes xargs to replace occurrences of replace-str in the command arguments with items read from standard input.