OS Manuals

/usr/bin/xargs

GNU find utilities

From findutils 4.11.0-r5 (os), captured 2026-11-05 by running xargs --help (exit 0). permalink

Usage: /usr/bin/xargs [OPTION]... [COMMAND [INITIAL-ARGS]...]
Run COMMAND with arguments INITIAL-ARGS and more arguments read from input.

Mandatory and optional arguments to long options are also
mandatory or optional for the corresponding short option.
  -0, --null                   items are separated by a null, not whitespace;
                                 disables quote and backslash processing and
                                 logical EOF processing
  -a, --arg-file=FILE          read arguments from FILE, not standard input
  -d, --delimiter=CHARACTER    items in input stream are separated by CHARACTER,
                                 not by whitespace; disables quote and backslash
                                 processing and logical EOF processing
  -E END                       set logical EOF string; if END occurs as a line
                                 of input, the rest of the input is ignored
                                 (ignored if -0 or -d was specified)
  -e, --eof[=END]              equivalent to -E END if END is specified;
                                 otherwise, there is no end-of-file string
  -I R                         same as --replace=R
  -i, --replace[=R]            replace R in INITIAL-ARGS with names read
                                 from standard input, split at newlines;
                                 if R is unspecified, assume {}
  -L, --max-lines=MAX-LINES    use at most MAX-LINES non-blank input lines per
                                 command line
  -l[MAX-LINES]                similar to -L but defaults to at most one non-
                                 blank input line if MAX-LINES is not specified
  -n, --max-args=MAX-ARGS      use at most MAX-ARGS arguments per command line
  -o, --open-tty               Reopen standard input as /dev/tty in the child
                                 process before executing the command; useful to
                                 run an interactive application.
  -P, --max-procs=MAX-PROCS    run at most MAX-PROCS processes at a time
  -p, --interactive            prompt before running commands
      --process-slot-var=VAR   set environment variable VAR in child processes
  -r, --no-run-if-empty        if there are no arguments, then do not run COMMAND;
                                 if this option is not given, COMMAND will be
                                 run at least once
  -s, --max-chars=MAX-CHARS    limit length of command line to MAX-CHARS
      --show-limits            show limits on command-line length
  -t, --verbose                print commands before executing them
  -x, --exit                   exit if the size (see -s) is exceeded
      --help                   display this help and exit
      --version                output version information and exit

If COMMAND is omitted, the default is 'echo'.

Please see also the documentation at https://www.gnu.org/software/findutils/.
You can report (and track progress on fixing) bugs in the "/usr/bin/xargs"
program via the GNU findutils bug-reporting page at
https://savannah.gnu.org/bugs/?group=findutils or, if
you have no web access, by sending email to <bug-findutils@gnu.org>.
Options (21)
OptionDescriptionSource
-0, --nullInput items are terminated by a null character instead of by whitespace, and the quotes and backslash are not special (every character is taken literally).help + man + man
-a, --arg-file FILERead items from file instead of standard input.help + man
-d, --delimiter CHARACTERitems in input stream are separated by CHARACTER, not by whitespace;help + man
-E ENDset logical EOF string;help
-e, --eof ENDequivalent to -E END if END is specified;help
-I Rsame as --replace=Rhelp
-i, --replace Rreplace R in INITIAL-ARGS with names read from standard input, split at newlines;help
-L, --max-lines MAX-LINESuse at most MAX-LINES non-blank input lines per command linehelp
-l MAX-LINESsimilar to -L but defaults to at most one non- blank input line if MAX-LINES is not specifiedhelp
-n, --max-args MAX-ARGSUse at most max-args arguments per command line.help + man
-o, --open-ttyReopen standard input as /dev/tty in the child process before executing the command;help + man + man
-P, --max-procs MAX-PROCSrun at most MAX-PROCS processes at a timehelp + man
-p, --interactivePrompt the user about whether to run each command line and read a line from the terminal.help + man + man
--process-slot-var VARSet the environment variable name to a unique value in each running child process.help + man
-r, --no-run-if-emptyIf the standard input does not contain any nonblanks, do not run the command.help + man + man
-s, --max-chars MAX-CHARSUse at most max-chars characters per command line, including the command and initial-arguments and the terminating nulls at the ends of the argument strings.help + man
--show-limitsDisplay the limits on the command-line length which are imposed by the operating system, xargs' choice of buffer size and the -s option.help + man
-t, --verbosePrint the command line on the standard error output before executing it.help + man + man
-x, --exitExit if the size (see the -s option) is exceeded.help + man + man
--helpPrint a summary of the options to xargs and exit.help + man
--versionPrint the version number of xargs and exit.help + man
Exit status (7) from the manual page
0if it succeeds (and any commands run by xargs, if there were any, exited normally with exit status 0).
123if any invocation of the command exited with status other than 0 or 255 (though see below).
124if the command exited with status 255
125if the command is killed by a signal
126if the command cannot be run
127if the command is not found
1if some other error occurred.
Examples (2) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.