1 .TH XARGS 1L \" -*- nroff -*-
3 xargs \- build and execute command lines from standard input
6 [\-0prtx] [\-e[eof-str]] [\-i[replace-str]] [\-l[max-lines]]
7 [\-n max-args] [\-s max-chars] [\-P max-procs] [\-\-null] [\-\-eof[=eof-str]]
8 [\-\-replace[=replace-str]] [\-\-max-lines[=max-lines]] [\-\-interactive]
9 [\-\-max-chars=max-chars] [\-\-verbose] [\-\-exit] [\-\-max-procs=max-procs]
10 [\-\-max-args=max-args] [\-\-no-run-if-empty] [\-\-version] [\-\-help]
11 [command [initial-arguments]]
14 documents the GNU version of
17 reads arguments from the standard input, delimited by blanks (which can be
18 protected with double or single quotes or a backslash) or newlines,
21 (default is /bin/echo) one or more times with any
23 followed by arguments read from standard input. Blank lines on the
24 standard input are ignored.
27 exits with the following status:
30 123 if any invocation of the command exited with status 1-125
31 124 if the command exited with status 255
32 125 if the command is killed by a signal
33 126 if the command cannot be run
34 127 if the command is not found
35 1 if some other error occurred.
40 Input filenames are terminated by a null character instead of by
41 whitespace, and the quotes and backslash are not special (every
42 character is taken literally). Disables the end of file string, which
43 is treated like any other argument. Useful when arguments might
44 contain white space, quote marks, or backslashes. The GNU find
45 \-print0 option produces input suitable for this mode.
47 .I "\-\-eof[=eof-str], \-e[eof-str]"
48 Set the end of file string to \fIeof-str\fR. If the end of file
49 string occurs as a line of input, the rest of the input is ignored.
50 If \fIeof-str\fR is omitted, there is no end of file string. If this
51 option is not given, the end of file string defaults to "_".
54 Print a summary of the options to
58 .I "\-\-replace[=replace-str], \-i[replace-str]"
59 Replace occurences of \fIreplace-str\fR in the initial arguments with
60 names read from standard input.
61 Also, unquoted blanks do not terminate arguments.
62 If \fIreplace-str\fR is omitted, it
63 defaults to "{}" (like for `find \-exec'). Implies \fI\-x\fP and
66 .I "\-\-max-lines[=max-lines], -l[max-lines]"
67 Use at most \fImax-lines\fR nonblank input lines per command line;
68 \fImax-lines\fR defaults to 1 if omitted. Trailing blanks cause an
69 input line to be logically continued on the next input line. Implies
72 .I "\-\-max-args=max-args, \-n max-args"
73 Use at most \fImax-args\fR arguments per command line. Fewer than
74 \fImax-args\fR arguments will be used if the size (see the \-s option)
75 is exceeded, unless the \-x option is given, in which case \fBxargs\fR
78 .I "\-\-interactive, \-p"
79 Prompt the user about whether to run each command line and read a line
80 from the terminal. Only run the command line if the response starts
81 with `y' or `Y'. Implies \fI\-t\fR.
83 .I "\-\-no-run-if-empty, \-r"
84 If the standard input does not contain any nonblanks, do not run the
85 command. Normally, the command is run once even if there is no input.
87 .I "\-\-max-chars=max-chars, \-s max-chars"
88 Use at most \fImax-chars\fR characters per command line, including the
89 command and initial arguments and the terminating nulls at the ends of
90 the argument strings. The default is as large as possible, up to 20k
94 Print the command line on the standard error output before executing
98 Print the version number of
103 Exit if the size (see the \fI\-s\fR option) is exceeded.
105 .I "\-\-max-procs=max-procs, \-P max-procs"
106 Run up to \fImax-procs\fR processes at a time; the default is 1. If
107 \fImax-procs\fR is 0, \fBxargs\fR will run as many processes as
108 possible at a time. Use the \fI\-n\fR option with \fI\-P\fR;
109 otherwise chances are that only one exec will be done.
111 \fBfind\fP(1L), \fBlocate\fP(1L), \fBlocatedb\fP(5L), \fBupdatedb\fP(1)
112 \fBFinding Files\fP (on-line in Info, or printed)