{
    "content": [
        {
            "type": "text",
            "text": "# xargs(1) (man)\n\n## TLDR\n\n> Execute a command with piped arguments coming from another command, a file, etc.\n\n- Run a command using the input data as arguments:\n  `{{arguments_source}} | xargs {{command}}`\n- Run multiple chained commands on the input data:\n  `{{arguments_source}} | xargs sh -c \"{{command1}} && {{command2}} | {{command3}}\"`\n- Execute a new command with each argument:\n  `{{arguments_source}} | xargs {{-n|--max-args}} 1 {{command}}`\n- Raise the parallel process limit to 10 (default is 1; 0 means as many processes as possible):\n  `{{arguments_source}} | xargs {{-P|--max-procs}} 10 {{-n|--max-args}} {{1}} {{command}}`\n- Execute the command once for each input line, replacing any occurrences of the placeholder (here marked as `_`) with the input line:\n  `{{arguments_source}} | xargs -I _ {{command}} _ {{optional_extra_arguments}}`\n- Prompt user for confirmation before executing command (confirm with `y` or `Y`):\n  `{{arguments_source}} | xargs {{-p|--interactive}} {{command}}`\n- Read a file for arguments to be given to a command:\n  `xargs {{-a|--arg-file}} {{path/to/file}} {{command}}`\n- Allow the command to access the terminal for interactive input:\n  `{{arguments_source}} | xargs {{-o|--open-tty}} {{command}}`\n\n*Source: tldr-pages*\n\n---\n\n**Summary:** xargs - build and execute command lines from standard input\n\n**Synopsis:** xargs [options] [command [initial-arguments]]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -0 | --null | — | Input items are terminated by a null character instead of by whitespace, and the quotes and backslash are not special (e |\n| -a | — | — | Read items from file instead of standard input. If you use this option, stdin remains unchanged when commands are run. O |\n| -E | — | — | Set the end of file string to eof-str. If the end of file string occurs as a line of input, the rest of the input is ign |\n| -e | --eof | — | This option is a synonym for the -E option. Use -E instead, because it is POSIX com‐ pliant while this option is not. If |\n| -I | — | — | Replace occurrences of replace-str in the initial-arguments with names read from stan‐ dard input. Also, unquoted blanks |\n| -i | --replace | — | This option is a synonym for -Ireplace-str if replace-str is specified. If the re‐ place-str argument is missing, the ef |\n| -L | — | — | Use at most max-lines nonblank input lines per command line. Trailing blanks cause an input line to be logically continu |\n| -l | --max-lines | — | Synonym for the -L option. Unlike -L, the max-lines argument is optional. If max- lines is not specified, it defaults to |\n| -n | --max-args | — | Use at most max-args arguments per command line. Fewer than max-args arguments will be used if the size (see the -s opti |\n| -P | --max-procs | — | Run up to max-procs processes at a time; the default is 1. If max-procs is 0, xargs will run as many processes as possib |\n| -o | --open-tty | — | Reopen stdin as /dev/tty in the child process before executing the command. This is useful if you want xargs to run an i |\n| -p | --interactive | — | Prompt the user about whether to run each command line and read a line from the termi‐ nal. Only run the command line if |\n| -r | --no-run-if-empty | — | If the standard input does not contain any nonblanks, do not run the command. Normal‐ ly, the command is run once even i |\n| -s | --max-chars | — | Use at most max-chars characters per command line, including the command and initial- arguments and the terminating null |\n| — | --show-limits | — | Display the limits on the command-line length which are imposed by the operating sys‐ tem, xargs' choice of buffer size  |\n| -t | --verbose | — | Print the command line on the standard error output before executing it. |\n| -x | --exit | — | Exit if the size (see the -s option) is exceeded. --help Print a summary of the options to xargs and exit. |\n| — | --version | — | Print the version number of xargs and exit. The options --max-lines (-L, -l), --replace (-I, -i) and --max-args (-n) are |\n\n## Examples\n\n- `Find  files  named  core in or below the directory /tmp and delete them.  Note that this will`\n- `work incorrectly if there are any filenames containing newlines or spaces.`\n- `Find files named core in or below the directory /tmp and delete them, processing filenames in`\n- `such a way that file or directory names containing spaces or newlines are correctly handled.`\n- `Find  files  named  core in or below the directory /tmp and delete them, but more efficiently`\n- `than in the previous example (because we avoid the need to use fork(2) and exec(2) to  launch`\n- `rm and we don't need the extra xargs process).`\n- `Generates a compact listing of all the users on the system.`\n\n## See Also\n\n- find(1)\n- kill(1)\n- locate(1)\n- updatedb(1)\n- fork(2)\n- execvp(3)\n- locatedb(5)\n- signal(7)\n- XARGS(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (2 lines)\n- **DESCRIPTION** (7 lines) — 2 subsections\n  - -n -L (9 lines)\n  - -print0 (3 lines)\n- **OPTIONS** (1 lines) — 18 subsections\n  - -0, --null (7 lines)\n  - -a --arg-file= (16 lines)\n  - -E (4 lines)\n  - -e --eof (4 lines)\n  - -I (4 lines)\n  - -i --replace (4 lines)\n  - -L (3 lines)\n  - -l --max-lines (4 lines)\n  - -n --max-args (4 lines)\n  - -P --max-procs (18 lines)\n  - -o, --open-tty (3 lines)\n  - -p, --interactive (8 lines)\n  - -r, --no-run-if-empty (4 lines)\n  - -s --max-chars (8 lines)\n  - --show-limits (4 lines)\n  - -t, --verbose (2 lines)\n  - -x, --exit (4 lines)\n  - --version (11 lines)\n- **EXAMPLES** (1 lines) — 4 subsections\n  - find /tmp -name core -type f -print | xargs /bin/rm -f (3 lines)\n  - find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f (4 lines)\n  - find /tmp -depth -name core -type f -delete (5 lines)\n  - cut -d: -f1 < /etc/passwd | sort | xargs echo (2 lines)\n- **EXIT STATUS** (20 lines)\n- **STANDARDS CONFORMANCE** (14 lines)\n- **BUGS** (14 lines) — 2 subsections\n  - somecommand | xargs -s 50000 echo | xargs -I '{}' -s 100000  (1 lines)\n  - -i (5 lines)\n- **REPORTING BUGS** (9 lines)\n- **COPYRIGHT** (5 lines)\n- **SEE ALSO** (8 lines)\n\n## Full Content\n\n### NAME\n\nxargs - build and execute command lines from standard input\n\n### SYNOPSIS\n\nxargs [options] [command [initial-arguments]]\n\n### DESCRIPTION\n\nThis manual page documents the GNU version of xargs.  xargs reads items from the standard in‐\nput, delimited by blanks (which can be protected with double or single quotes or a backslash)\nor  newlines, and executes the command (default is /bin/echo) one or more times with any ini‐\ntial-arguments followed by items read from standard input.  Blank lines on the standard input\nare ignored.\n\nThe  command line for command is built up until it reaches a system-defined limit (unless the\n\n#### -n -L\n\nsary  to use up the list of input items.  In general, there will be many fewer invocations of\ncommand than there were items in the input.  This will normally have significant  performance\nbenefits.  Some commands can usefully be executed in parallel too; see the -P option.\n\nBecause Unix filenames can contain blanks and newlines, this default behaviour is often prob‐\nlematic; filenames containing blanks and/or newlines are incorrectly processed by xargs.   In\nthese  situations it is better to use the -0 option, which prevents such problems.   When us‐\ning this option you will need to ensure that the program which produces the input  for  xargs\nalso  uses  a  null  character  as a separator.  If that program is GNU find for example, the\n\n#### -print0\n\nIf any invocation of the command exits with a status of  255,  xargs  will  stop  immediately\nwithout reading any further input.  An error message is issued on stderr when this happens.\n\n### OPTIONS\n\n#### -0, --null\n\nInput  items  are  terminated  by  a  null character instead of by whitespace, and the\nquotes and backslash are not special (every character is taken  literally).   Disables\nthe  end  of file string, which is treated like any other argument.  Useful when input\nitems might contain white space, quote marks, or backslashes.  The  GNU  find  -print0\noption produces input suitable for this mode.\n\n#### -a --arg-file=\n\nRead items from file instead of standard input.  If you use this option, stdin remains\nunchanged when commands are run.  Otherwise, stdin is redirected from /dev/null.\n\n\n--delimiter=delim, -d delim\nInput items are terminated by the specified character.  The specified delimiter may be\na  single character, a C-style character escape such as \\n, or an octal or hexadecimal\nescape code.  Octal and hexadecimal escape codes are understood as for the printf com‐\nmand.   Multibyte characters are not supported.  When processing the input, quotes and\nbackslash are not special; every character in the input is taken  literally.   The  -d\noption disables any end-of-file string, which is treated like any other argument.  You\ncan use this option when the input consists of  simply  newline-separated  items,  al‐\nthough  it  is almost always better to design your program to use --null where this is\npossible.\n\n#### -E\n\nSet the end of file string to eof-str.  If the end of file string occurs as a line  of\ninput, the rest of the input is ignored.  If neither -E nor -e is used, no end of file\nstring is used.\n\n#### -e --eof\n\nThis option is a synonym for the -E option.  Use -E instead, because it is POSIX  com‐\npliant  while  this  option  is  not.   If eof-str is omitted, there is no end of file\nstring.  If neither -E nor -e is used, no end of file string is used.\n\n#### -I\n\nReplace occurrences of replace-str in the initial-arguments with names read from stan‐\ndard input.  Also, unquoted blanks do not terminate input items; instead the separator\nis the newline character.  Implies -x and -L 1.\n\n#### -i --replace\n\nThis option is a synonym for -Ireplace-str if replace-str is specified.   If  the  re‐\nplace-str  argument is missing, the effect is the same as -I{}.  This option is depre‐\ncated; use -I instead.\n\n#### -L\n\nUse at most max-lines nonblank input lines per command line.  Trailing blanks cause an\ninput line to be logically continued on the next input line.  Implies -x.\n\n#### -l --max-lines\n\nSynonym  for  the  -L option.  Unlike -L, the max-lines argument is optional.  If max-\nlines is not specified, it defaults to one.  The -l option  is  deprecated  since  the\nPOSIX standard specifies -L instead.\n\n#### -n --max-args\n\nUse  at  most max-args arguments per command line.  Fewer than max-args arguments will\nbe used if the size (see the -s option) is exceeded, unless the -x option is given, in\nwhich case xargs will exit.\n\n#### -P --max-procs\n\nRun  up  to max-procs processes at a time; the default is 1.  If max-procs is 0, xargs\nwill run as many processes as possible at a time.  Use the -n option or the -L  option\nwith  -P;  otherwise chances are that only one exec will be done.  While xargs is run‐\nning, you can send its process a SIGUSR1 signal to increase the number of commands  to\nrun simultaneously, or a SIGUSR2 to decrease the number.  You cannot increase it above\nan implementation-defined limit (which is shown with --show-limits).  You  cannot  de‐\ncrease  it  below  1.  xargs never terminates its commands; when asked to decrease, it\nmerely waits for more than one existing command to terminate before starting another.\n\nPlease note that it is up to the called processes to properly manage  parallel  access\nto  shared resources.  For example, if more than one of them tries to print to stdout,\nthe output will be produced in an indeterminate order (and very likely mixed  up)  un‐\nless  the processes collaborate in some way to prevent this.  Using some kind of lock‐\ning scheme is one way to prevent such problems.  In general, using  a  locking  scheme\nwill help ensure correct output but reduce performance.  If you don't want to tolerate\nthe performance difference, simply arrange for each process to produce a separate out‐\nput file (or otherwise use separate resources).\n\n#### -o, --open-tty\n\nReopen  stdin  as /dev/tty in the child process before executing the command.  This is\nuseful if you want xargs to run an interactive application.\n\n#### -p, --interactive\n\nPrompt the user about whether to run each command line and read a line from the termi‐\nnal.  Only run the command line if the response starts with `y' or `Y'.  Implies -t.\n\n--process-slot-var=name\nSet  the  environment  variable  name to a unique value in each running child process.\nValues are reused once child processes exit.  This can be used in a  rudimentary  load\ndistribution scheme, for example.\n\n#### -r, --no-run-if-empty\n\nIf the standard input does not contain any nonblanks, do not run the command.  Normal‐\nly, the command is run once even if there is no input.  This option is  a  GNU  exten‐\nsion.\n\n#### -s --max-chars\n\nUse  at most max-chars characters per command line, including the command and initial-\narguments and the terminating nulls at the ends of the argument strings.  The  largest\nallowed  value is system-dependent, and is calculated as the argument length limit for\nexec, less the size of your environment, less 2048 bytes of headroom.  If  this  value\nis more than 128KiB, 128Kib is used as the default value; otherwise, the default value\nis the maximum.  1KiB is 1024 bytes.   xargs  automatically  adapts  to  tighter  con‐\nstraints.\n\n#### --show-limits\n\nDisplay  the limits on the command-line length which are imposed by the operating sys‐\ntem, xargs' choice of buffer size and the -s option.  Pipe the  input  from  /dev/null\n(and perhaps specify --no-run-if-empty) if you don't want xargs to do anything.\n\n#### -t, --verbose\n\nPrint the command line on the standard error output before executing it.\n\n#### -x, --exit\n\nExit if the size (see the -s option) is exceeded.\n\n--help Print a summary of the options to xargs and exit.\n\n#### --version\n\nPrint the version number of xargs and exit.\n\nThe  options --max-lines (-L, -l), --replace (-I, -i) and --max-args (-n) are mutually exclu‐\nsive. If some of them are specified at the same time, then xargs will generally use  the  op‐\ntion  specified  last on the command line, i.e., it will reset the value of the offending op‐\ntion (given before) to its default value.  Additionally, xargs will issue a warning  diagnos‐\ntic  on  stderr.   The exception to this rule is that the special max-args value 1 ('-n1') is\nignored after the --replace option and its aliases -I and -i, because it would  not  actually\nconflict.\n\n### EXAMPLES\n\n#### find /tmp -name core -type f -print | xargs /bin/rm -f\n\nFind  files  named  core in or below the directory /tmp and delete them.  Note that this will\nwork incorrectly if there are any filenames containing newlines or spaces.\n\n#### find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f\n\nFind files named core in or below the directory /tmp and delete them, processing filenames in\nsuch a way that file or directory names containing spaces or newlines are correctly handled.\n\n#### find /tmp -depth -name core -type f -delete\n\nFind  files  named  core in or below the directory /tmp and delete them, but more efficiently\nthan in the previous example (because we avoid the need to use fork(2) and exec(2) to  launch\nrm and we don't need the extra xargs process).\n\n#### cut -d: -f1 < /etc/passwd | sort | xargs echo\n\nGenerates a compact listing of all the users on the system.\n\n### EXIT STATUS\n\nxargs exits with the following status:\n\n0      if it succeeds\n\n123    if any invocation of the command exited with status 1-125\n\n124    if the command exited with status 255\n\n125    if the command is killed by a signal\n\n126    if the command cannot be run\n\n127    if the command is not found\n\n1      if some other error occurred.\n\n\nExit  codes  greater  than 128 are used by the shell to indicate that a program died due to a\nfatal signal.\n\n### STANDARDS CONFORMANCE\n\nAs of GNU xargs version 4.2.9, the default behaviour of xargs is not to have a  logical  end-\nof-file marker.  POSIX (IEEE Std 1003.1, 2004 Edition) allows this.\n\nThe  -l and -i options appear in the 1997 version of the POSIX standard, but do not appear in\nthe 2004 version of the standard.  Therefore you should use -L and -I instead, respectively.\n\nThe -o option is an extension to the POSIX standard for better compatibility with BSD.\n\nThe POSIX standard allows implementations to have a limit on the size of arguments to the ex‐‐\nec  functions.   This  limit could be as low as 4096 bytes including the size of the environ‐\nment.  For scripts to be portable, they must not rely on a larger value.  However, I know  of\nno  implementation whose actual limit is that small.  The --show-limits option can be used to\ndiscover the actual limits in force on the current system.\n\n### BUGS\n\nIt is not possible for xargs to be used securely, since there will always be a time  gap  be‐\ntween  the production of the list of input files and their use in the commands that xargs is‐\nsues.  If other users have access to the system, they can manipulate  the  filesystem  during\nthis  time  window  to force the action of the commands xargs runs to apply to files that you\ndidn't intend.  For a more detailed discussion of this and related problems, please refer  to\nthe ``Security Considerations'' chapter in the findutils Texinfo documentation.  The -execdir\noption of find can often be used as a more secure alternative.\n\nWhen you use the -I option, each line read from the  input  is  buffered  internally.    This\nmeans  that  there  is an upper limit on the length of input line that xargs will accept when\nused with the -I option.  To work around this limitation, you can use the -s  option  to  in‐\ncrease  the  amount of buffer space that xargs uses, and you can also use an extra invocation\nof xargs to ensure that very long lines do not occur.  For example:\n\n#### somecommand | xargs -s 50000 echo | xargs -I '{}' -s 100000 rm '{}'\n\nHere, the first invocation of xargs has no input line length limit because it doesn't use the\n\n#### -i\n\nit never encounters a line which is longer than it can handle.   This is not an  ideal  solu‐\ntion.   Instead,  the -i option should not impose a line length limit, which is why this dis‐\ncussion appears in the BUGS section.  The problem doesn't occur with the  output  of  find(1)\nbecause it emits just one filename per line.\n\n### REPORTING BUGS\n\nGNU findutils online help: <https://www.gnu.org/software/findutils/#get-help>\nReport any translation bugs to <https://translationproject.org/team/>\n\nReport any other issue via the form at the GNU Savannah bug tracker:\n<https://savannah.gnu.org/bugs/?group=findutils>\nGeneral  topics  about  the  GNU findutils package are discussed at the bug-findutils mailing\nlist:\n<https://lists.gnu.org/mailman/listinfo/bug-findutils>\n\n### COPYRIGHT\n\nCopyright © 1990-2021 Free Software Foundation, Inc.  License GPLv3+: GNU GPL  version  3  or\nlater <https://gnu.org/licenses/gpl.html>.\nThis  is free software: you are free to change and redistribute it.  There is NO WARRANTY, to\nthe extent permitted by law.\n\n### SEE ALSO\n\nfind(1), kill(1), locate(1), updatedb(1), fork(2), execvp(3), locatedb(5), signal(7)\n\nFull documentation <https://www.gnu.org/software/findutils/xargs>\nor available locally via: info xargs\n\n\n\nXARGS(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "xargs",
        "section": "1",
        "mode": "man",
        "summary": "xargs - build and execute command lines from standard input",
        "synopsis": "xargs [options] [command [initial-arguments]]",
        "tldr_summary": "Execute a command with piped arguments coming from another command, a file, etc.",
        "tldr_examples": [
            {
                "description": "Run a command using the input data as arguments",
                "command": "{{arguments_source}} | xargs {{command}}"
            },
            {
                "description": "Run multiple chained commands on the input data",
                "command": "{{arguments_source}} | xargs sh -c \"{{command1}} && {{command2}} | {{command3}}\""
            },
            {
                "description": "Execute a new command with each argument",
                "command": "{{arguments_source}} | xargs {{-n|--max-args}} 1 {{command}}"
            },
            {
                "description": "Raise the parallel process limit to 10 (default is 1; 0 means as many processes as possible)",
                "command": "{{arguments_source}} | xargs {{-P|--max-procs}} 10 {{-n|--max-args}} {{1}} {{command}}"
            },
            {
                "description": "Execute the command once for each input line, replacing any occurrences of the placeholder (here marked as `_`) with the input line",
                "command": "{{arguments_source}} | xargs -I _ {{command}} _ {{optional_extra_arguments}}"
            },
            {
                "description": "Prompt user for confirmation before executing command (confirm with `y` or `Y`)",
                "command": "{{arguments_source}} | xargs {{-p|--interactive}} {{command}}"
            },
            {
                "description": "Read a file for arguments to be given to a command",
                "command": "xargs {{-a|--arg-file}} {{path/to/file}} {{command}}"
            },
            {
                "description": "Allow the command to access the terminal for interactive input",
                "command": "{{arguments_source}} | xargs {{-o|--open-tty}} {{command}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-0",
                "long": "--null",
                "arg": null,
                "description": "Input items are terminated by a null character instead of by whitespace, and the quotes and backslash are not special (every character is taken literally). Disables the end of file string, which is treated like any other argument. Useful when input items might contain white space, quote marks, or backslashes. The GNU find -print0 option produces input suitable for this mode."
            },
            {
                "flag": "-a",
                "long": null,
                "arg": null,
                "description": "Read items from file instead of standard input. If you use this option, stdin remains unchanged when commands are run. Otherwise, stdin is redirected from /dev/null. --delimiter=delim, -d delim Input items are terminated by the specified character. The specified delimiter may be a single character, a C-style character escape such as \\n, or an octal or hexadecimal escape code. Octal and hexadecimal escape codes are understood as for the printf com‐ mand. Multibyte characters are not supported. When processing the input, quotes and backslash are not special; every character in the input is taken literally. The -d option disables any end-of-file string, which is treated like any other argument. You can use this option when the input consists of simply newline-separated items, al‐ though it is almost always better to design your program to use --null where this is possible."
            },
            {
                "flag": "-E",
                "long": null,
                "arg": null,
                "description": "Set the end of file string to eof-str. If the end of file string occurs as a line of input, the rest of the input is ignored. If neither -E nor -e is used, no end of file string is used."
            },
            {
                "flag": "-e",
                "long": "--eof",
                "arg": null,
                "description": "This option is a synonym for the -E option. Use -E instead, because it is POSIX com‐ pliant while this option is not. If eof-str is omitted, there is no end of file string. If neither -E nor -e is used, no end of file string is used."
            },
            {
                "flag": "-I",
                "long": null,
                "arg": null,
                "description": "Replace occurrences of replace-str in the initial-arguments with names read from stan‐ dard input. Also, unquoted blanks do not terminate input items; instead the separator is the newline character. Implies -x and -L 1."
            },
            {
                "flag": "-i",
                "long": "--replace",
                "arg": null,
                "description": "This option is a synonym for -Ireplace-str if replace-str is specified. If the re‐ place-str argument is missing, the effect is the same as -I{}. This option is depre‐ cated; use -I instead."
            },
            {
                "flag": "-L",
                "long": null,
                "arg": null,
                "description": "Use at most max-lines nonblank input lines per command line. Trailing blanks cause an input line to be logically continued on the next input line. Implies -x."
            },
            {
                "flag": "-l",
                "long": "--max-lines",
                "arg": null,
                "description": "Synonym for the -L option. Unlike -L, the max-lines argument is optional. If max- lines is not specified, it defaults to one. The -l option is deprecated since the POSIX standard specifies -L instead."
            },
            {
                "flag": "-n",
                "long": "--max-args",
                "arg": null,
                "description": "Use at most max-args arguments per command line. Fewer than max-args arguments will be used if the size (see the -s option) is exceeded, unless the -x option is given, in which case xargs will exit."
            },
            {
                "flag": "-P",
                "long": "--max-procs",
                "arg": null,
                "description": "Run up to max-procs processes at a time; the default is 1. If max-procs is 0, xargs will run as many processes as possible at a time. Use the -n option or the -L option with -P; otherwise chances are that only one exec will be done. While xargs is run‐ ning, you can send its process a SIGUSR1 signal to increase the number of commands to run simultaneously, or a SIGUSR2 to decrease the number. You cannot increase it above an implementation-defined limit (which is shown with --show-limits). You cannot de‐ crease it below 1. xargs never terminates its commands; when asked to decrease, it merely waits for more than one existing command to terminate before starting another. Please note that it is up to the called processes to properly manage parallel access to shared resources. For example, if more than one of them tries to print to stdout, the output will be produced in an indeterminate order (and very likely mixed up) un‐ less the processes collaborate in some way to prevent this. Using some kind of lock‐ ing scheme is one way to prevent such problems. In general, using a locking scheme will help ensure correct output but reduce performance. If you don't want to tolerate the performance difference, simply arrange for each process to produce a separate out‐ put file (or otherwise use separate resources)."
            },
            {
                "flag": "-o",
                "long": "--open-tty",
                "arg": null,
                "description": "Reopen stdin as /dev/tty in the child process before executing the command. This is useful if you want xargs to run an interactive application."
            },
            {
                "flag": "-p",
                "long": "--interactive",
                "arg": null,
                "description": "Prompt the user about whether to run each command line and read a line from the termi‐ nal. Only run the command line if the response starts with `y' or `Y'. Implies -t. --process-slot-var=name Set the environment variable name to a unique value in each running child process. Values are reused once child processes exit. This can be used in a rudimentary load distribution scheme, for example."
            },
            {
                "flag": "-r",
                "long": "--no-run-if-empty",
                "arg": null,
                "description": "If the standard input does not contain any nonblanks, do not run the command. Normal‐ ly, the command is run once even if there is no input. This option is a GNU exten‐ sion."
            },
            {
                "flag": "-s",
                "long": "--max-chars",
                "arg": null,
                "description": "Use 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. The largest allowed value is system-dependent, and is calculated as the argument length limit for exec, less the size of your environment, less 2048 bytes of headroom. If this value is more than 128KiB, 128Kib is used as the default value; otherwise, the default value is the maximum. 1KiB is 1024 bytes. xargs automatically adapts to tighter con‐ straints."
            },
            {
                "flag": "",
                "long": "--show-limits",
                "arg": null,
                "description": "Display the limits on the command-line length which are imposed by the operating sys‐ tem, xargs' choice of buffer size and the -s option. Pipe the input from /dev/null (and perhaps specify --no-run-if-empty) if you don't want xargs to do anything."
            },
            {
                "flag": "-t",
                "long": "--verbose",
                "arg": null,
                "description": "Print the command line on the standard error output before executing it."
            },
            {
                "flag": "-x",
                "long": "--exit",
                "arg": null,
                "description": "Exit if the size (see the -s option) is exceeded. --help Print a summary of the options to xargs and exit."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Print the version number of xargs and exit. The options --max-lines (-L, -l), --replace (-I, -i) and --max-args (-n) are mutually exclu‐ sive. If some of them are specified at the same time, then xargs will generally use the op‐ tion specified last on the command line, i.e., it will reset the value of the offending op‐ tion (given before) to its default value. Additionally, xargs will issue a warning diagnos‐ tic on stderr. The exception to this rule is that the special max-args value 1 ('-n1') is ignored after the --replace option and its aliases -I and -i, because it would not actually conflict."
            }
        ],
        "examples": [
            "Find  files  named  core in or below the directory /tmp and delete them.  Note that this will",
            "work incorrectly if there are any filenames containing newlines or spaces.",
            "Find files named core in or below the directory /tmp and delete them, processing filenames in",
            "such a way that file or directory names containing spaces or newlines are correctly handled.",
            "Find  files  named  core in or below the directory /tmp and delete them, but more efficiently",
            "than in the previous example (because we avoid the need to use fork(2) and exec(2) to  launch",
            "rm and we don't need the extra xargs process).",
            "Generates a compact listing of all the users on the system."
        ],
        "see_also": [
            {
                "name": "find",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/find/1/json"
            },
            {
                "name": "kill",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/kill/1/json"
            },
            {
                "name": "locate",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/locate/1/json"
            },
            {
                "name": "updatedb",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/updatedb/1/json"
            },
            {
                "name": "fork",
                "section": "2",
                "url": "https://www.chedong.com/phpMan.php/man/fork/2/json"
            },
            {
                "name": "execvp",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/execvp/3/json"
            },
            {
                "name": "locatedb",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/locatedb/5/json"
            },
            {
                "name": "signal",
                "section": "7",
                "url": "https://www.chedong.com/phpMan.php/man/signal/7/json"
            },
            {
                "name": "XARGS",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/XARGS/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 7,
                "subsections": [
                    {
                        "name": "-n -L",
                        "lines": 9,
                        "flag": "-L"
                    },
                    {
                        "name": "-print0",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-0, --null",
                        "lines": 7,
                        "flag": "-0",
                        "long": "--null"
                    },
                    {
                        "name": "-a --arg-file=",
                        "lines": 16,
                        "flag": "-a"
                    },
                    {
                        "name": "-E",
                        "lines": 4,
                        "flag": "-E"
                    },
                    {
                        "name": "-e --eof",
                        "lines": 4,
                        "flag": "-e",
                        "long": "--eof"
                    },
                    {
                        "name": "-I",
                        "lines": 4,
                        "flag": "-I"
                    },
                    {
                        "name": "-i --replace",
                        "lines": 4,
                        "flag": "-i",
                        "long": "--replace"
                    },
                    {
                        "name": "-L",
                        "lines": 3,
                        "flag": "-L"
                    },
                    {
                        "name": "-l --max-lines",
                        "lines": 4,
                        "flag": "-l",
                        "long": "--max-lines"
                    },
                    {
                        "name": "-n --max-args",
                        "lines": 4,
                        "flag": "-n",
                        "long": "--max-args"
                    },
                    {
                        "name": "-P --max-procs",
                        "lines": 18,
                        "flag": "-P",
                        "long": "--max-procs"
                    },
                    {
                        "name": "-o, --open-tty",
                        "lines": 3,
                        "flag": "-o",
                        "long": "--open-tty"
                    },
                    {
                        "name": "-p, --interactive",
                        "lines": 8,
                        "flag": "-p",
                        "long": "--interactive"
                    },
                    {
                        "name": "-r, --no-run-if-empty",
                        "lines": 4,
                        "flag": "-r",
                        "long": "--no-run-if-empty"
                    },
                    {
                        "name": "-s --max-chars",
                        "lines": 8,
                        "flag": "-s",
                        "long": "--max-chars"
                    },
                    {
                        "name": "--show-limits",
                        "lines": 4,
                        "long": "--show-limits"
                    },
                    {
                        "name": "-t, --verbose",
                        "lines": 2,
                        "flag": "-t",
                        "long": "--verbose"
                    },
                    {
                        "name": "-x, --exit",
                        "lines": 4,
                        "flag": "-x",
                        "long": "--exit"
                    },
                    {
                        "name": "--version",
                        "lines": 11,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "EXAMPLES",
                "lines": 1,
                "subsections": [
                    {
                        "name": "find /tmp -name core -type f -print | xargs /bin/rm -f",
                        "lines": 3
                    },
                    {
                        "name": "find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f",
                        "lines": 4
                    },
                    {
                        "name": "find /tmp -depth -name core -type f -delete",
                        "lines": 5
                    },
                    {
                        "name": "cut -d: -f1 < /etc/passwd | sort | xargs echo",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "EXIT STATUS",
                "lines": 20,
                "subsections": []
            },
            {
                "name": "STANDARDS CONFORMANCE",
                "lines": 14,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 14,
                "subsections": [
                    {
                        "name": "somecommand | xargs -s 50000 echo | xargs -I '{}' -s 100000 rm '{}'",
                        "lines": 1
                    },
                    {
                        "name": "-i",
                        "lines": 5,
                        "flag": "-i"
                    }
                ]
            },
            {
                "name": "REPORTING BUGS",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 8,
                "subsections": []
            }
        ]
    }
}