On Fri, 03 Oct 2003 16:27, mike wrote:
Thanks, Fajar I edited the /etc/logrotate.d/syslog to daily instead of weekly. Under /etc/cron.daily I have logrotate* so I should be good to go.
Mike, JFYI:
the command to force log rotation of /var/log/syslog and /var/log/messages would be:
# logrotate -v -f /etc/logrotate.d/syslog
I see now, that was my mistake on the command, "rotate" needed a config file to use. I was useing "rotate -f" instead of
"rotate -v -f /etc/logrotate.d/syslog"
NOTE: Using the default logrotate config file for "syslog" (/etc/logrotate.d/syslog) will not only rotate /var/log/syslog and /var/log/messages but ALSO rotates a hell of lot of other logs like /var/log/auth.log and /var/log/user.log for example. Look at the list in the config file.
Yes I discovered that after it ran.
You may want to first create your own config file just for /var/log/syslog and /var/log/messages that you can use whenever the need arises. You could just copy /etc/logrotate.d/syslog to /home/user/mysyslog and remove all other logs from the list in this file and issue the command:
# logrotate -v -f /home/user/mysyslog
That is a great idea! I am going to try that, I could use the practice learning how the config files work.
Sharrea
Thank you Sharrea for showing me that. Still trying to get a handle on those man pages. :-)
Mike
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com
