logrotate tip of the day
David Kramer
david-8uUts6sDVDvs2Lz0fTdYFQ at public.gmane.org
Wed Jan 13 07:23:17 EST 2010
Tom Metro wrote:
> David Kramer wrote:
>> When you add your own logrotate rules, say to rotate files in
>> /home/david/log, DO NOT specify the wildcard as /home/david/log/*
>> instead of /home/david/log/*.log, as every gzipped archived log will
>> then also be rotated, and so on, and so on, and so on.
>
> There are a number of ways you can shoot yourself in the foot with
> logrotate, and it usually won't warn you, or provide much diagnostics
> when something goes wring.
Yeah, there should definitely be a "Haven't I seen this file before?"
sanity check, like, if the file is already a .gz, it's probably not a
file you want to gzip again.
I'm still trying to recover.
- "rm *gz*" coughed after half an hour complaining the arg list was too
long.
- "find . -name '*gz*' -delete" ran for 5 hours without ending
- I'm now trying "rm -rf log && mkdir log". 25 minutes and counting.
More information about the Discuss
mailing list