Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 8 Sep 2005 16:46:29 +0200 (MEST) From: Alexander Gottwald To: zzapper cc: cygwin AT cygwin DOT com Subject: Re: xargs still nok? In-Reply-To: Message-ID: References: <20050908102658 DOT GC5555 AT calimero DOT vinschen DOT de> <4320281B DOT 6090005 AT lists DOT cichon DOT 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 DOT Gottwald AT s1999 DOT tu-chemnitz DOT 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/