Article View: comp.unix.admin
Article #4064Re: tail -f and log file rotation
From: Jim Brand
Date: Fri, 02 Mar 2001 14:34
Date: Fri, 02 Mar 2001 14:34
35 lines
2607 bytes
2607 bytes
If you still need some code I wrote a C program several years ago that works fine IF the log names are fairly predictable. As in an increasing sequence of numbers appended to the date with a ".log" suffix. I'm sure it could be modified to suit your needs. A little ugly but I'm no programmer! Let me know and I'll see if I can find it. Jim Vince <vlasfargues@yahoo.com> wrote in message news:t9thrboar8bh8e@corp.supernews.com... > I suppose I'm not the only one to have the following problem: > > I use "tail -f" to get the new entries in the syslog file. But when the file > is renamed (because it's too big or too old), tail is stuck on the renamed > file, which is not appended anymore. > I've heard about "tailf" (linux) or the option "tail -fname", but there is > nothing like that on Solaris, HP-UX or AIX. > > Where can I get some source code to build my own tail that will support this > option or will follow and returned the entries inserted in the new syslog > file? > > Thanks for your help. > > Vincent > > > > >
Technical Details
Message-ID:
<bcOn6.7783$%4.866060@newsread1.prod.itd.earthlink.net>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mailReferences:
<t9thrboar8bh8e@corp.supernews.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fc89c,28d4954342c36ebf X-Google-Attributes: gidfc89c,public X-Google-Thread: 115614,28d4954342c36ebf X-Google-Attributes: gid115614,public X-Google-Thread: 1020c6,28d4954342c36ebf X-Google-Attributes: gid1020c6,public X-Google-Thread: 11035d,28d4954342c36ebf X-Google-Attributes: gid11035d,public X-Google-Thread: 110f2c,28d4954342c36ebf X-Google-Attributes: gid110f2c,public X-Google-ArrivalTime: 2001-03-02 06:36:05 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail From: "Jim Brand" <jhbrand@notes.up.com> Newsgroups: comp.unix.admin,comp.unix.aix,comp.unix.programmer,comp.unix.solaris,fr.comp.os.unix References: <t9thrboar8bh8e@corp.supernews.com> Subject: Re: tail -f and log file rotation Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 Message-ID: <bcOn6.7783$%4.866060@newsread1.prod.itd.earthlink.net> Date: Fri, 02 Mar 2001 14:34:47 GMT NNTP-Posting-Host: 167.132.162.31 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 983543687 167.132.162.31 (Fri, 02 Mar 2001 06:34:47 PST) NNTP-Posting-Date: Fri, 02 Mar 2001 06:34:47 PST Organization: EarthLink Inc. -- http://www.EarthLink.net