LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   VAR - logs - when to delete (https://www.linuxquestions.org/questions/linux-newbie-8/var-logs-when-to-delete-295435/)

High-gain 02-27-2005 07:19 AM

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

harken 02-27-2005 07:30 AM

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.

High-gain 02-27-2005 09:38 AM

Many thanks for your help and info - much appreciated. Good Luck

harken 02-27-2005 09:47 AM

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

acid_kewpie 02-27-2005 09:54 AM

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.