From owner-freebsd-arch Fri Jun 21 15:51:34 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 8824B37B400; Fri, 21 Jun 2002 15:51:18 -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 g5LMpFQC066539 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=FAIL); Fri, 21 Jun 2002 18:51:16 -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="koi8-u" From: Mikhail Teterin Organization: Virtual Estates, Inc. To: Terry Lambert Subject: Re: feature request for xargs Date: Fri, 21 Jun 2002 18:50:59 -0400 X-Mailer: KMail [version 1.4] Cc: Dag-Erling Smorgrav , Juli Mallett , arch@FreeBSD.ORG References: <200206200706.g5K76M514469@freefall.freebsd.org> <200206211110.45597.mi+mx@aldan.algebra.com> <3D13A6BB.E4FB6085@mindspring.com> In-Reply-To: <3D13A6BB.E4FB6085@mindspring.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200206211850.59359.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 06:20 pm, Terry Lambert wrote: = Mikhail Teterin wrote: = > On Friday 21 June 2002 11:09 am, Dag-Erling Smorgrav wrote: = > = Mikhail Teterin writes: = > = > All operations, involving many light tasks can benefit, i.e. = > = > = > = > find /some/dir \! -type d -print0 | xargs -0 -j0 rm -f = > = = > = find /some/dir \! -type d -delete = > = > Wouldn't this be slower, since find will be waiting for the delete = > to complete (yes, I know about the racing)? = = Give up. 8-). Ok, ok. One last attempt... = It's a bad example. There are good examples. But the delete example, = trading an "rm" for a fork+exec and an async rm doesn't win. The = problem is that the parent directory is going to be locked against = other processes during the rm anyway. My calculations are, the number of files in one directory (on average) will be far below the maximum number of arguments. So all files in a usual directory will be processed sequentionally by one of the many rm-s. = Pick one of the good examples, like the script that wants to run on = "*.jpg" or whatever, and fight the fight there. = = Personally, that example sold me on the idea that adding "-j" to xargs = is potentially useful, rather than merely harmless and redundant. Glad you liked it :-) -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message