LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-27-2005, 07:19 AM   #1
High-gain
Member
 
Registered: Dec 2004
Location: London,UK
Distribution: Mandriva 2007
Posts: 156

Rep: Reputation: 15
Thumbs up 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
 
Old 02-27-2005, 07:30 AM   #2
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
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.
 
Old 02-27-2005, 09:38 AM   #3
High-gain
Member
 
Registered: Dec 2004
Location: London,UK
Distribution: Mandriva 2007
Posts: 156

Original Poster
Rep: Reputation: 15
Smile

Many thanks for your help and info - much appreciated. Good Luck
 
Old 02-27-2005, 09:47 AM   #4
harken
Member
 
Registered: Jan 2005
Location: Between the chair and the desk
Distribution: Debian Sarge, kernel 2.6.13
Posts: 666

Rep: Reputation: 30
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".
 
Old 02-27-2005, 09:54 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Removed /var/logs and pkgtool is fucked up kopikat Slackware 2 02-03-2005 03:26 PM
strange logs in /var/log/messages dominant Linux - Security 1 04-21-2004 12:12 PM
Delete file in /var chii-chan Linux - Newbie 5 03-19-2004 04:58 PM
/var/logs = 11gigs!!! Safe to remove? breakerfall Linux - General 17 02-18-2004 04:59 PM
var logs jgascon Linux - Security 1 08-09-2003 11:14 AM


All times are GMT -5. The time now is 11:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration