Date: Fri, 21 Jun 2002 15:20:43 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Mikhail Teterin <mi+mx@aldan.algebra.com> Cc: Dag-Erling Smorgrav <des@ofug.org>, Juli Mallett <jmallett@FreeBSD.ORG>, arch@FreeBSD.ORG Subject: Re: feature request for xargs Message-ID: <3D13A6BB.E4FB6085@mindspring.com> References: <200206200706.g5K76M514469@freefall.freebsd.org> <200206211033.03948.mi%2Bmx@aldan.algebra.com> <xzpbsa44qjv.fsf@flood.ping.uio.no> <200206211110.45597.mi%2Bmx@aldan.algebra.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Mikhail Teterin wrote: > On Friday 21 June 2002 11:09 am, Dag-Erling Smorgrav wrote: > = Mikhail Teterin <mi+mx@aldan.algebra.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D13A6BB.E4FB6085>