xargs
Build and execute commands from stdin input.
Syntax
$xargs [OPTIONS] [COMMAND]
Examples
Examples
$find . -name '*.txt' | xargs rm
Examples
$ls | xargs -I {} echo '{}'
Typical use cases
find . -name '*.txt' | xargs rm
ls | xargs -I {} echo '{}'
Note
Common pattern: find ... -print0 | xargs -0 command
Export