Date: Tue, 9 Apr 2002 00:18:58 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Brendan McAlpine <bmcalpine@macconnect.com> Cc: questions@FreeBSD.org Subject: Re: Scripting question... Message-ID: <20020408211858.GA25469@hades.hell.gr> In-Reply-To: <B8D75512.BD50%bmcalpine@macconnect.com> References: <B8D75512.BD50%bmcalpine@macconnect.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020408211858.GA25469>
