XARGS
NAME SYNOPSIS DESCRIPTION SEE ALSO
xargs - build and execute command lines from standard input
xargs [-0prtx? [-e[[eof-str?] [-i[[replace-str?] [-l[[max-lines?] [-n max-args? [-s max-chars? [-P max-procs? [--null? [--eof[[=eof-str?] [--replace[[=replace-str?] [--max-lines[[=max-lines?] [--interactive? [--max-chars=max-chars? [--verbose? [--exit? [--max-procs=max-procs? [--max-args=max-args? [--no-run-if-empty? [--version? [--help? [command [[initial-arguments?]
This manual page documents the GNU version of xargs. xargs reads arguments from the standard input, delimited by blanks (which can be protected with double or single quotes or a backslash) or newlines, and executes the command (default is /bin/echo) one or more times with any initial-arguments followed by arguments read from standard input. Blank lines on the standard input are ignored.
xargs exits with the following status: |0| if it succeeds |123| if any invocation of the command exited with status 1-125 |124| if the command exited with status 255 |125| if the command is killed by a signal |126| if the command cannot be run |127| if the command is not found |1| if some other error occurred.
If you're using the command:
grep 7d?] archive/*
and the archive directory has grown too large and is now giving the error Argument list too long you can use:
find archive -type f | xargs grep '7d'
This could also be done using the -exec option to find, but this approach causing a process creation for each file.
find(1), locate(1), locatedb(5), updatedb(1) Finding Files (on-line in Info, or printed)
6 pages link to xargs(1):