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.
|
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. |