xargs

, command,

Syntax

command | xargs [options] [command]

Parameters

ParametersDescriptionExamplesLevel
-I {} , Common
-n N Parameters Common
-P Common
-d Common
-0 null ( find -print0) Common
-t command() Common

Examples

.log

find . -name '*.log' | xargs rm

find . -name '*.js' -print0 | xargs -0 grep 'TODO'

URL

cat urls.txt | xargs -I {} curl -s {}

4

find . -name '*.png' | xargs -P 4 -I {} convert {} -resize 50% {}

docker ps -q | xargs docker stop

Tips

Related Commands