From owner-freebsd-questions Tue Apr 9 8: 4:15 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id C545C37B416 for ; Tue, 9 Apr 2002 08:04:08 -0700 (PDT) Received: from hades.hell.gr (patr530-a146.otenet.gr [212.205.215.146]) by mailsrv.otenet.gr (8.12.2/8.12.2) with ESMTP id g39F43dS010454; Tue, 9 Apr 2002 18:04:04 +0300 (EEST) Received: from hades.hell.gr (hades [127.0.0.1]) by hades.hell.gr (8.12.2/8.12.2) with ESMTP id g39F4RGI065064; Tue, 9 Apr 2002 18:04:27 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from charon@localhost) by hades.hell.gr (8.12.2/8.12.2/Submit) id g39F4QlC065059; Tue, 9 Apr 2002 18:04:26 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 9 Apr 2002 18:04:26 +0300 From: Giorgos Keramidas To: Buki Cc: Brendan McAlpine , questions@FreeBSD.ORG Subject: Re: Scripting question... Message-ID: <20020409150426.GB64641@hades.hell.gr> References: <20020408211858.GA25469@hades.hell.gr> <20020409082142.B14238@veverka.sh.cvut.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020409082142.B14238@veverka.sh.cvut.cz> User-Agent: Mutt/1.3.28i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002-04-09 08:21, Buki wrote: > On Tue, Apr 09, 2002 at 12:18:58AM +0300, Giorgos Keramidas wrote: > > On 2002-04-08 14:09, Brendan McAlpine wrote: > > > I have a set of directories that contain radius log files from the last > > > month. Each log file is named the same thing but the directories they > > > reside in are date stamped. I want to write a script that searches the > > > directories, finds files named ?detail?, and cats the detail files into one > > > large combined file. > > > > For deeper nestings, you can probably get away with */*/detail, but > > it's safer to use find/xargs: > > > > $ ( find . -name detail -type f | xargs cat ) > /tmp/foo > > as the result should be one large file, I'd probable replace > with >> That's why I used parentheses to group the commands :) Giorgos Keramidas FreeBSD Documentation Project keramida@{freebsd.org,ceid.upatras.gr} http://www.FreeBSD.org/docproj/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message