From owner-freebsd-arch Fri Jun 21 9:43:56 2002 Delivered-To: freebsd-arch@freebsd.org Received: from corbulon.video-collage.com (corbulon.video-collage.com [64.35.99.179]) by hub.freebsd.org (Postfix) with ESMTP id 22C4537B428; Fri, 21 Jun 2002 09:42:54 -0700 (PDT) Received: from misha (250-217.customer.cloud9.net [168.100.250.217]) by corbulon.video-collage.com (8.12.2/8.12.2) with ESMTP id g5LGgpQC063184 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=FAIL); Fri, 21 Jun 2002 12:42:53 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) X-Authentication-Warning: corbulon.video-collage.com: Host 250-217.customer.cloud9.net [168.100.250.217] claimed to be misha Content-Type: text/plain; charset="iso-8859-1" From: Mikhail Teterin Organization: Virtual Estates, Inc. To: Garance A Drosihn , Juli Mallett Subject: Re: feature request for xargs Date: Fri, 21 Jun 2002 12:42:35 -0400 X-Mailer: KMail [version 1.4] Cc: arch@FreeBSD.ORG References: <200206200706.g5K76M514469@freefall.freebsd.org> <200206211033.03948.mi+mx@aldan.algebra.com> In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200206211242.35819.mi+mx@aldan.algebra.com> X-Scanned-By: MIMEDefang 2.15 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Friday 21 June 2002 11:45 am, Garance A Drosihn wrote: = > = >All operations, involving many light tasks can benefit, i.e. = > = > find /some/dir \! -type d -print0 | xargs -0 -j0 rm -f = = It's not clear to me that this specific case would benefit. If you = have a large number of files, then this will spawn off a large number = of processes, only to see those processes Not _that_ large -- each rm will (sequentionally) be removing up to MAX_ARGS (sp?) files. = In thinking about that example, I wonder if we should not allow '-j 0' = to spawn infinite processes. Maybe allow a -j value from 1 to 64 (or = some other arbitrary number), just to reduce the chances of a one-line = "fork bomb". Well, not infinite, but up to one's maxproc. gmake's -l option may be a good idea too -- unlimited so long the system load remains at or below (but at least one). -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message