1752565 Members
5573 Online
108788 Solutions
New Discussion юеВ

logrotate

 
csreenivas
Frequent Advisor

logrotate

Hi
I am new to red hat linux.
I have to rotate the /var/log/messages files "daily" and move the log files to archive directory and keep the log files for 4 weeks.
Can anyone of help me how to modify the /etc/logrotate.conf

Thanks
Sreenivas.
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: logrotate

Shalom,

Doing it without logrotate.

http://www.ducea.com/2006/06/06/rotating-linux-log-files-part-1-syslog/

Shalom,

take a look at the files in /etc/logrotate.d

You see a file called syslog.

You may wish to duplicate it and make one just for messages

# system-specific logs may be also be configured here.

Customization here.

You need to move the messages file to a daily rotation and ad customization, perhaps to syslog or its clone to keep the files for 4 weeks.

They are going to pile up though.

SEP


Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
csreenivas
Frequent Advisor

Re: logrotate

Can you help me how to customize the syslog for the /var/log/messages file.