Re: Constant file size



Adrián E. Córdoba wrote:
Thank you for your comments, Jon.

1) It is not necessary the file size will be exactly XX MB. It's enough
to keep constant the number of lines.

Okay.

2) Working with a "rolling log file" and writting in the middle of the
file, make the file hard to read if you open the file with simple text
applications like Notepad because you need to find the oldest line in
the file. It is possible but it isn't desirable.

In that case, unless you *really* want to rewrite the whole log file
each time, I suggest you roll over to different log files (deleting old
ones) rather than try to keep it all in one log.

Jon

.



Relevant Pages

  • REGEX help with substitute
    ... the log file and splits it on the spaces. ... My current fix is to rewrite the entire log file. ... I figured a easy fix would be to use substitute inline with my current code ... 2nd is my regular expression correct. ...
    (perl.beginners)
  • Re: [opensuse] Help - tmp full
    ... I could solve the problem by deleting (as root on init 3 level) ... A log file with more then 23 GB! ...
    (SuSE)
  • Re: How to delete all log files?
    ... They can be safely deleted after inspection. ... If you want those logs to roll with the others, ... script. ... single log file in sight. ...
    (comp.sys.mac.system)
  • sending via smtp (code included)
    ... I have a script that sends me a log file via smtp. ... # version 0.05 added the deleting of the Ellipse cache directory ...
    (comp.lang.tcl)
  • Re: How to delete all log files?
    ... If you want those logs to roll with the others, ... script. ... single log file in sight. ... least you will be keeping some sort of control on them. ...
    (comp.sys.mac.system)