VAR - logs - when to delete
Hi There - I wonder if anyone can advise me on the following please -
' I have been running Linux Mandrake 10 now for almost one year now and am very pleased and impressed with the distro. Looking at my VAR logs there seems to be a lot of old info on some logs so can anyone advise me on how long I should keep this info and what or if there is any procedure to removing them. Although I have enough disk space for these files I would like to keep unnecessary files off the system.' Thank you for your time and attention |
Take a look at "man logrotate". This way you can set your logs to be rotated daily, weekly, monthly, whatever. You must run logrotate by adding the proper entry in crontab.
|
Many thanks for your help and info - much appreciated. Good Luck
|
No problem, you're welcome. One thing though: the man pages for logrotate aren't exactly verbose and it looks kinda' fuzzy. So, especially when it comes to "sensitive" files such as /var/log/syslog, in my opinion (I'm not very intimate with logrotate myself), you should use the "copytruncate" option instead of "create".
|
on mdk, logrotate really should be trundling on just fine already.
actually i found mine wasn't set up right on my server just this morning... some failed test i forgot about last year had left kernel/info at 433mb when the disk space finally ran out! oops... |
All times are GMT -5. The time now is 08:04 AM. |