From owner-freebsd-arch Fri Jun 21 15:21:33 2002 Delivered-To: freebsd-arch@freebsd.org Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by hub.freebsd.org (Postfix) with ESMTP id 8F95D37B413; Fri, 21 Jun 2002 15:21:27 -0700 (PDT) Received: from pool0462.cvx21-bradley.dialup.earthlink.net ([209.179.193.207] helo=mindspring.com) by falcon.mail.pas.earthlink.net with esmtp (Exim 3.33 #2) id 17LWmP-00026y-00; Fri, 21 Jun 2002 15:21:22 -0700 Message-ID: <3D13A6BB.E4FB6085@mindspring.com> Date: Fri, 21 Jun 2002 15:20:43 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Mikhail Teterin Cc: Dag-Erling Smorgrav , Juli Mallett , arch@FreeBSD.ORG Subject: Re: feature request for xargs References: <200206200706.g5K76M514469@freefall.freebsd.org> <200206211033.03948.mi+mx@aldan.algebra.com> <200206211110.45597.mi+mx@aldan.algebra.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 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-). 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. 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. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message