LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Limiting the size of a log file (https://www.linuxquestions.org/questions/linux-general-1/limiting-the-size-of-a-log-file-94120/)

ganninu 09-18-2003 07:18 AM

Limiting the size of a log file
 
I'm using a syslog daemon to capture logs and put them in /var/log/my_log_file.log . This logfile is incredibly increasing in terms of size. Is there an intelligent way to restrict its size, to say, 1 MB, and new data will overwrite the older one? Thanks folks.

druuna 09-18-2003 08:23 AM

I haven't used RedHat in a long time, but if I'm not wrong RedHat uses logrotate (/etc/logrotate.d/).

Take a look at the examples there.

You can add your entry or create a seperate file(s) for your personal stuff.

Also take a look at: man 8 logrotate


All times are GMT -5. The time now is 08:30 PM.