Skip to Content
Linux in a Nutshell, 6th Edition
book

Linux in a Nutshell, 6th Edition

by Ellen Siever, Stephen Figgins, Robert Love, Arnold Robbins
September 2009
Beginner
942 pages
85h 34m
English
O'Reilly Media, Inc.
Content preview from Linux in a Nutshell, 6th Edition

Name

xargs

Synopsis

xargs [options] [command]

Execute command (with any initial arguments), but read remaining arguments from standard input instead of specifying them directly. xargs passes these arguments in several bundles to the command, allowing it to process more arguments than it could normally handle at once. The arguments are typically a long list of filenames (generated by ls or find, for example) that get passed to xargs via a pipe. The default command is /bin/echo.

Options

−0, --null

Expect filenames to be terminated by NULL instead of whitespace. Do not treat quotes or backslashes specially.

-a file, --arg-file=file

Read arguments from file, not standard input.

-E string

Set EOF to string. Default is no EOF string.

--help

Print usage information and then exit.

-I string

Replace all occurrences of string in the initial arguments with names read from standard input. Unquoted blanks are not considered argument terminators; newline character is used. Implies -x and -L 1.

-L lines

Allow no more than lines nonblank input lines on the command line (default is 1). Implies -x.

-n args, --max-args=args

Allow no more than args arguments on the command line. Overridden by the maximum number of characters set with -s.

-p, --interactive

Prompt for confirmation (y or Y) before running each command line. Implies -t.

-P max, --max-procs=max

Allow no more than max processes to run at once. The default is 1. A maximum of 0 allows as many as possible to run at once.

-r, --no-run-if-empty

Do not run command if ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Unix in a Nutshell, 4th Edition

Unix in a Nutshell, 4th Edition

Arnold Robbins
Linux Under the Hood

Linux Under the Hood

Sander van Vugt
Linux Kernel in a Nutshell

Linux Kernel in a Nutshell

Greg Kroah-Hartman

Publisher Resources

ISBN: 9780596806088Errata Page