From owner-freebsd-questions@FreeBSD.ORG Sat May 30 15:57:22 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F3CE1065830 for ; Sat, 30 May 2009 15:57:22 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (wojtek.tensor.gdynia.pl [IPv6:2001:4070:101:2::1]) by mx1.freebsd.org (Postfix) with ESMTP id C34568FC14 for ; Sat, 30 May 2009 15:57:21 +0000 (UTC) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from wojtek.tensor.gdynia.pl (localhost [IPv6:::1]) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3) with ESMTP id n4UFvGbW018722; Sat, 30 May 2009 17:57:16 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Received: from localhost (wojtek@localhost) by wojtek.tensor.gdynia.pl (8.14.3/8.14.3/Submit) with ESMTP id n4UFvEwA018719; Sat, 30 May 2009 17:57:14 +0200 (CEST) (envelope-from wojtek@wojtek.tensor.gdynia.pl) Date: Sat, 30 May 2009 17:57:14 +0200 (CEST) From: Wojciech Puchar To: Mel Flynn In-Reply-To: <200905301412.50958.mel.flynn+fbsd.questions@mailing.thruhere.net> Message-ID: References: <80cddf609e38046ffa0ce3f2bdab235c.squirrel@relay.lc-words.com> <139b44430905300456x62bf9c0ybf46bcab6b64e25@mail.gmail.com> <200905301412.50958.mel.flynn+fbsd.questions@mailing.thruhere.net> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Valentin Bud , freebsd-questions@freebsd.org, Zbigniew Szalbot Subject: Re: find and searching for specific expression in files X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 May 2009 15:57:23 -0000 >> because it tells you the file in which the text pattern was found :). > > Discouraged because: > - it's possible to hit maxarglen if the root directory has many > subdirectories. xargs is usefull too. i would it as forking for each file will make processing really slow. xargs can cut input data into given chunks with -n option, so grep will be called for say 100 files at once.