Print this page
4703 would like xargs support for -P
   1 '\" te
   2 .\"  Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
   3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
   4 .\" http://www.opengroup.org/bookstore/.
   5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   6 .\"  This notice shall appear on any product containing this material.
   7 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   9 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
  10 .TH XARGS 1 "November 24, 2012"
  11 .SH NAME
  12 xargs \- construct argument lists and invoke utility
  13 .SH SYNOPSIS
  14 .LP
  15 .nf
  16 \fBxargs\fR [\fB-t\fR] [\fB-0\fR] [\fB-p\fR] [\fB-e\fR[\fIeofstr\fR]] [\fB-E\fR \fIeofstr\fR]
  17      [\fB-I\fR \fIreplstr\fR] [\fB-i\fR[\fIreplstr\fR]] [\fB-L\fR \fInumber\fR] [\fB-l\fR[\fInumber\fR]]
  18      [\fB-n\fR \fInumber\fR [\fB-x\fR]] [\fB-s\fR \fIsize\fR] [\fIutility\fR [\fIargument\fR...]]

  19 .fi
  20 
  21 .SH DESCRIPTION
  22 .sp
  23 .LP
  24 The \fBxargs\fR utility constructs a command line consisting of the
  25 \fIutility\fR and \fIargument\fR operands specified followed by as many
  26 arguments read in sequence from standard input as fit in length and number
  27 constraints specified by the options. The \fBxargs\fR utility then invokes the
  28 constructed command line and waits for its completion. This sequence is
  29 repeated until an end-of-file condition is detected on standard input or an
  30 invocation of a constructed command line returns an exit status of \fB255\fR.
  31 .sp
  32 .LP
  33 Arguments in the standard input must be separated by unquoted blank characters,
  34 or unescaped blank characters or newline characters. A string of zero or more
  35 non-double-quote (\fB"\fR) and non-newline characters can be quoted by
  36 enclosing them in double-quotes. A string of zero or more non-apostrophe
  37 (\fB\&'\fR) and non-newline characters can be quoted by enclosing them in
  38 apostrophes. Any unquoted character can be escaped by preceding it with a


 149 .RS +4
 150 .TP
 151 .ie t \(bu
 152 .el o
 153 The last iteration has fewer than \fInumber\fR, but not zero, operands
 154 remaining.
 155 .RE
 156 .RE
 157 
 158 .sp
 159 .ne 2
 160 .na
 161 \fB-p\fR
 162 .ad
 163 .RS 15n
 164 Prompt mode. The user is asked whether to execute \fIutility\fR at each
 165 invocation. Trace mode (\fB-t\fR) is turned on to write the command instance to
 166 be executed, followed by a prompt to standard error. An affirmative response
 167 (specific to the user's locale) read from \fB/dev/tty\fR executes the command;
 168 otherwise, that particular invocation of \fIutility\fR is skipped.










 169 .RE
 170 
 171 .sp
 172 .ne 2
 173 .na
 174 \fB\fB-s\fR \fIsize\fR\fR
 175 .ad
 176 .RS 15n
 177 Invokes \fIutility\fR using as many standard input arguments as possible
 178 yielding a command line length less than \fIsize\fR (a positive decimal
 179 integer) bytes. Fewer arguments are used if:
 180 .RS +4
 181 .TP
 182 .ie t \(bu
 183 .el o
 184 The total number of arguments exceeds that specified by the \fB-n\fR option, or
 185 .RE
 186 .RS +4
 187 .TP
 188 .ie t \(bu


   1 '\" te
   2 .\"  Copyright 1989 AT&T Copyright (c) 1992, X/Open Company Limited All Rights Reserved Portions Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved
   3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
   4 .\" http://www.opengroup.org/bookstore/.
   5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   6 .\"  This notice shall appear on any product containing this material.
   7 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   9 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
  10 .TH XARGS 1 "March 31, 2014"
  11 .SH NAME
  12 xargs \- construct argument lists and invoke utility
  13 .SH SYNOPSIS
  14 .LP
  15 .nf
  16 \fBxargs\fR [\fB-t\fR] [\fB-0\fR] [\fB-p\fR] [\fB-e\fR[\fIeofstr\fR]] [\fB-E\fR \fIeofstr\fR]
  17      [\fB-I\fR \fIreplstr\fR] [\fB-i\fR[\fIreplstr\fR]] [\fB-L\fR \fInumber\fR] [\fB-l\fR[\fInumber\fR]]
  18      [\fB-n\fR \fInumber\fR [\fB-x\fR]] [\fB-P\fR \fImaxprocs\fR] [\fB-s\fR \fIsize\fR]
  19      [\fIutility\fR [\fIargument\fR...]]
  20 .fi
  21 
  22 .SH DESCRIPTION
  23 .sp
  24 .LP
  25 The \fBxargs\fR utility constructs a command line consisting of the
  26 \fIutility\fR and \fIargument\fR operands specified followed by as many
  27 arguments read in sequence from standard input as fit in length and number
  28 constraints specified by the options. The \fBxargs\fR utility then invokes the
  29 constructed command line and waits for its completion. This sequence is
  30 repeated until an end-of-file condition is detected on standard input or an
  31 invocation of a constructed command line returns an exit status of \fB255\fR.
  32 .sp
  33 .LP
  34 Arguments in the standard input must be separated by unquoted blank characters,
  35 or unescaped blank characters or newline characters. A string of zero or more
  36 non-double-quote (\fB"\fR) and non-newline characters can be quoted by
  37 enclosing them in double-quotes. A string of zero or more non-apostrophe
  38 (\fB\&'\fR) and non-newline characters can be quoted by enclosing them in
  39 apostrophes. Any unquoted character can be escaped by preceding it with a


 150 .RS +4
 151 .TP
 152 .ie t \(bu
 153 .el o
 154 The last iteration has fewer than \fInumber\fR, but not zero, operands
 155 remaining.
 156 .RE
 157 .RE
 158 
 159 .sp
 160 .ne 2
 161 .na
 162 \fB-p\fR
 163 .ad
 164 .RS 15n
 165 Prompt mode. The user is asked whether to execute \fIutility\fR at each
 166 invocation. Trace mode (\fB-t\fR) is turned on to write the command instance to
 167 be executed, followed by a prompt to standard error. An affirmative response
 168 (specific to the user's locale) read from \fB/dev/tty\fR executes the command;
 169 otherwise, that particular invocation of \fIutility\fR is skipped.
 170 .RE
 171 
 172 .sp
 173 .ne 2
 174 .na
 175 \fB\fB-P\fR \fImaxprocs\fR\fR
 176 .ad
 177 .RS 15n
 178 Invokes \fIutility\fR using at most \fImaxprocs\fR (a positive decimal integer)
 179 parallel child processes.
 180 .RE
 181 
 182 .sp
 183 .ne 2
 184 .na
 185 \fB\fB-s\fR \fIsize\fR\fR
 186 .ad
 187 .RS 15n
 188 Invokes \fIutility\fR using as many standard input arguments as possible
 189 yielding a command line length less than \fIsize\fR (a positive decimal
 190 integer) bytes. Fewer arguments are used if:
 191 .RS +4
 192 .TP
 193 .ie t \(bu
 194 .el o
 195 The total number of arguments exceeds that specified by the \fB-n\fR option, or
 196 .RE
 197 .RS +4
 198 .TP
 199 .ie t \(bu