xargs

上級
1/8
user@linux:~/workspace$
find . -name "*.tmp" | xargs rm

Explanation

Finds all .tmp files and removes them all at once.

Options

-n NUse N arguments per command
-I {}Replace string placeholder
-pPrompt before execution
-tPrint command before execution
-0Input items separated by null
-P NRun up to N processes in parallel