From owner-freebsd-questions@FreeBSD.ORG Wed Feb 27 15:29:48 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6EE8106567B for ; Wed, 27 Feb 2008 15:29:48 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id AA8CD8FC30 for ; Wed, 27 Feb 2008 15:29:43 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.2/8.14.2) id m1RFTbxJ082712; Wed, 27 Feb 2008 09:29:37 -0600 (CST) (envelope-from dan) Date: Wed, 27 Feb 2008 09:29:37 -0600 From: Dan Nelson To: Wojciech Puchar Message-ID: <20080227152937.GJ3328@dan.emsphone.com> References: <20080227100132.G1831@wojtek.tensor.gdynia.pl> <47C52A64.5000701@locolomo.org> <20080227111551.GA2403@kobe.laptop> <20080227124822.C2519@wojtek.tensor.gdynia.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080227124822.C2519@wojtek.tensor.gdynia.pl> X-OS: FreeBSD 7.0-PRERELEASE User-Agent: Mutt/1.5.17 (2007-11-01) Cc: Giorgos Keramidas , freebsd-questions@freebsd.org Subject: Re: argument list too long X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Feb 2008 15:29:48 -0000 In the last episode (Feb 27), Wojciech Puchar said: >> one can easily write: >> >> find . -name '*.ogg' | \ >> while read file ; do \ >> blah "${file}" >> done >> >> xargs(1) is another popular tool for processing large argument lists: >> >> find -name '*.ogg' | xargs blah > > unless program "blah" starts slowly, and it's better to give it 2000 > params at once. > > but i've asked to be sure what is actual limit, and used xargs -n > 2000 to do the rest. That's less than xargs's default of 5000 :) The xargs manpage explains it all. -- Dan Nelson dnelson@allantgroup.com