Definition:
- build and execute command lines from standard input
- typical use:
command [options] [arguments] | xargs [options] {command}
- ex:
find /projects -type f -name "*.pdf" | xargs rm
removes all pdf files
Synopsis:
xargs [options] [command [initial-arguments]]
List of options:
- ..
-I replace-str
- Consider each line in the standard input as a single argument.
-
-E eof-str
-L max-lines
- Read a specified number of lines from the standard input, and concatenate them into one long string.
-n max-args, --max-args=max-args
- Read the maximum number of arguments from the standard input, and insert them at the end of the command template.
-p, --interactive
: prompt at each run
-s max-chars, --max-chars=max-chars
- ..
-t, --verbose
- write each command to stderr before executing