Re: file race question



On Sep 27, 8:50 pm, Cydrome Leader <prese...@xxxxxxxxxxxxxx> wrote:
mmccaws2 <mmcc...@xxxxxxxxxxx> wrote:
Hi

I have a tail -f operation on a syslog file dumping grepped output
into another file, grep.txt. I need to process then empty that file,
grep.txt, once a minute. How do I do this ensuring that I don't loose
new data from the tail -f operation.

Thanks

mike

You may want to use tail -F (uppercase) to tail that syslog file if you
can. That flag will tail even rotated syslog files, vs. just stopping when
it gets rotated out by whatever rotates your logs.

This doesn't work with all ways of rotating a file, but it should work
with any that are done correctly.

Great suggestion. I'll look into it.

Mike

.



Relevant Pages

  • Re: file race question
    ... I have a tail -f operation on a syslog file dumping grepped output ... I need to process then empty that file, ... You may want to use tail -F to tail that syslog file if you ... it gets rotated out by whatever rotates your logs. ...
    (comp.sys.hp.hpux)
  • Re: server times out for everything
    ... I've been getting entries in the syslog file that are all pretty much the ... Here's the tail end of the file as of right now: ... It was not solleo which rejected my message. ...
    (comp.mail.sendmail)
  • Re: 1994 Harley-Davidson Sportster 1200 Torque settings for head
    ... does anyone have the torque settings for the head and assembly on ... > this Bike?1994 Harley-Davidson Sportster 1200 Thanks ... Loose is too loose and too tight is broken. ... A Lizard can always grow a new tail, A Biker must always watch his tail. ...
    (rec.motorcycles.harley)
  • Re: Jib sheet questions and hand wringing
    ... light air, jib flogging gently, short tail on the bowline... ... I've had singularly bad luck with bowlines' shaking loose. ...
    (rec.boats.cruising)