Use:
The birth of this command is due to the inability of the pipeline output to support some commands that need to be used for xargs;
Find/sbin-perm +700 |ls-l This command is wrong.
Find/sbin-perm +700 |xargs Ls-l This is the right thing.
Syntax and parameters
Xargs-parameters + command
-0 when a sdtin contains special characters, it is treated as a general character, like /' space ' , etc.
For example:[email Protected]:~/test#echo "//" |xargs Echo
[Email Protected]:~/test#echo "//" |xargs-0 Echo
-
read in the file as sdtin
-
-e flag -e , flag must be a space-delimited flag when xargs analysis to include is stopped when it is marked.
- P Ask the user once every time a argument is executed.
- N Num The number of argument that is used at the time of the execution of the command, by default, is used for all.
-
indicates that the command is printed before execution.
-
or -i , which depends on supports, will xargs for each item name, usually one line to assign to {} instead.
-
no-run-if-empty when xargs 's input is empty when the
- s Num The best number of characters for the command line, which is the maximum number of command-line characters for that command after Xargs .
-
- l
-
with -l
-
delimiter, default xargs delimiter is carriage return, argument is a space, which is modified xargs delimiter
- x Exit The main point is to cooperate with- s use.
- P Modify the maximum number of processes
The usage and understanding of Xargs