From owner-freebsd-questions Mon Apr 8 23:21:53 2002 Delivered-To: freebsd-questions@freebsd.org Received: from service.sh.cvut.cz (service.sh.cvut.cz [147.32.127.214]) by hub.freebsd.org (Postfix) with ESMTP id 65BAF37B417 for ; Mon, 8 Apr 2002 23:21:48 -0700 (PDT) Received: from veverka.sh.cvut.cz (veverka.sh.cvut.cz [147.32.127.216]) by service.sh.cvut.cz (Postfix) with ESMTP id 46BAA1F1F1; Tue, 9 Apr 2002 08:21:33 +0200 (CEST) Received: (from buki@localhost) by veverka.sh.cvut.cz (8.9.3/8.9.2) id IAA14843; Tue, 9 Apr 2002 08:21:42 +0200 (CEST) (envelope-from buki) Date: Tue, 9 Apr 2002 08:21:42 +0200 From: Buki To: Giorgos Keramidas Cc: Brendan McAlpine , questions@FreeBSD.ORG Subject: Re: Scripting question... Message-ID: <20020409082142.B14238@veverka.sh.cvut.cz> References: <20020408211858.GA25469@hades.hell.gr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <20020408211858.GA25469@hades.hell.gr>; from keramida@ceid.upatras.gr on Tue, Apr 09, 2002 at 12:18:58AM +0300 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 Tue, Apr 09, 2002 at 12:18:58AM +0300, Giorgos Keramidas wrote: > On 2002-04-08 14:09, Brendan McAlpine wrote: > > Can someone point me in the right direction here....? > > > > 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. I know this should be simple, but I am drawing > > blanks.... > > $ cd /var/log/radius > $ cat */detail > /tmp/foo > > 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 >> Buki > > 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 -- PGP public key: http://dev.null.cz/buki.asc /"\ \ / ASCII Ribbon Campaign X Against HTML & Outlook Mail / \ http://www.thebackrow.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message