Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Thu, 8 Sep 2005 16:46:29 +0200 (MEST)
From: Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>
To: zzapper <david@tvis.co.uk>
cc: cygwin@cygwin.com
Subject: Re: xargs still nok?
In-Reply-To: <uji0i1d0k7f1ehc6h48u2kr0e5kajmctpp@4ax.com>
Message-ID: <Pine.LNX.4.58.0509081640050.26080@odoaker.hrz.tu-chemnitz.de>
References: <on00i11u7d2a93lkl1hu98sav3kvi0c5cj@4ax.com>  <20050908102658.GC5555@calimero.vinschen.de> <4320281B.6090005@lists.cichon.com>  <uji0i1d0k7f1ehc6h48u2kr0e5kajmctpp@4ax.com>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-IsSubscribed: yes

On Thu, 8 Sep 2005, zzapper wrote:

> >yes, you should rather write
> >$ find . -name "*.cfm" -print0 | xargs -0 grep -i host
> 
> Is Xargs still reqd for
> 
> find . -name '*.cfm' -exec grep -i {} \;

This is a speed issue. find -exec will spawn grep for each found entry
while xargs will group as much files as possible and reduces the number
of required grep calls.

eg                             
grep host file1                       grep host file1 file2 ... file256           
grep host file2                vs     grep host file257 ... 
... 
grep host file123456

bye
	ago 
-- 
 Alexander.Gottwald@s1999.tu-chemnitz.de 
 http://www.gotti.org           ICQ: 126018723

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

