Re: query about logrotate
On fredag 20. august 2004, 10:29, vivek misra wrote:
> acctually I am making a log rotate for log files and ionly want that
> all data except last six days are removed how could I done this,
> Is log rotate file is placed in crontab
If I understand your question correctly, you want to keep logs only for
six days?
I would suggest achieving this with a combination of daily and rotate
directives. From the man-page:
daily Log files are rotated every day.
rotate count
Log files are rotated count times before being
removed or mailed to the address specified in a
mail directive. If count is 0, old versions are
removed rather then rotated.
So, I think if you set daily and rotate 6, it would do what you expect.
All this happens in /etc/logrotate.conf and /etc/logrotate.d/ Please
have a good look at the files in there, they are rather
self-explanatory once you know where to look. You may have to edit many
files in /etc/logrotate.d/
Best,
Kjetil
--
Kjetil Kjernsmo
Astrophysicist/IT Consultant/Skeptic/Ski-orienteer/Orienteer/Mountaineer
kjetil@kjernsmo.net webmaster@skepsis.no editor@learn-orienteering.org
Homepage: http://www.kjetil.kjernsmo.net/ OpenPGP KeyID: 6A6A0BBC
Reply to: