Bash - Xargs (Standard input command execution)

> Procedural Languages > Bash Shell and (Unix|Linux) Utilities (XCU)

1 - About

xargs execute commands from standard input.

3 - Example

find /path -type f -print | xargs rm
 
# other example with hdfs
hdfs dfs -ls /path | grep -e pattern | awk '{print $8}' | xargs hdfs dfs -rm