You are not logged in.

#1 2005-03-09 16:13:00

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

delete old logs?

this may be a dumb question but can I delete some of my old logs in /var/log folder with the .# ending? If so is there a utility to automactically clean them up after a while?

Offline

#2 2005-03-09 16:26:13

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: delete old logs?

Does the logrotate command help you? I believe its installed by default in arch and is run from /etc/cron.daily/ and is configured in /etc/logrotate.conf.

Dusty

Offline

#3 2005-03-09 16:37:21

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: delete old logs?

ah..ok, In my config I have:

# Logs are moved into directory for rotation
# olddir /var/log/archive

I dont have and 'archive' directory. Should I uncomment this and create one or use the 'old' dir instead?

Offline

#4 2006-07-17 02:55:00

McQueen
Member
From: Arizona
Registered: 2006-03-20
Posts: 387

Re: delete old logs?

@ Penquin
I was searching the forums on this topic and was curious what you eventually setup in logrotate.conf.


/path/to/Truth

Offline

#5 2006-07-17 11:00:53

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: delete old logs?

McQueen wrote:

@ Penquin
I was searching the forums on this topic and was curious what you eventually setup in logrotate.conf.

Well logrotate was working for me I just didn't know anything about it at the time. I just saw 4 log files for each and thought it would continue.
I tried setting up the archive directory as I posted above but eventualy removed and went back to the default setup because it didn't matter.

Logrotate should work for everyone unless you are not running the system when the cronjob executes logrotate at midnight(?).

Offline

#6 2006-07-18 10:03:22

Mefju
Member
From: Poland
Registered: 2006-07-12
Posts: 104

Re: delete old logs?

Penguin wrote:

I dont have and 'archive' directory. Should I uncomment this and create one or use the 'old' dir instead?

Yes, you should. I've tunded on this option in my Arch, and it works fine. You have all yours previous logs and /var/log directory is clean. A compress option in /etc/logrotate.conf is also very useful.

Offline

Board footer

Powered by FluxBB