Computing.Net > Forums > Unix > How to keep the log file a fixed size

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to keep the log file a fixed size

Reply to Message Icon

Name: mike
Date: September 12, 2001 at 07:35:04 Pacific
Comment:

Hi there,

I have a program which will write some log information to a log file. The problem is this log file grows too fast. But the log information is necessary to me. What I want to do is trying to keep the log file in a fixed size (like 4MB), and if the file size reach the file limit, then delete some old log information and attach the new information at the end of the file.

Can anyone tell me if it is possible to do that, and better how to do it?

Thanks a lot.



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: How to keep the log file a fixed size

how to get the last field www.computing.net/answers/unix/how-to-get-the-last-field/6529.html

Log Size www.computing.net/answers/unix/log-size/4894.html

how to store the output file in .xls format www.computing.net/answers/unix/how-to-store-the-output-file-in-xls-format/8402.html