Deleting Log files on ubuntu
Tom Metro
blu-5a1Jt6qxUNc at public.gmane.org
Wed Jun 6 18:59:44 EDT 2007
Vinay Perneti wrote:
> Also I read about this tool called logrotate...
Which should be installed and active on a typical Ubuntu system. It runs
daily from a script in /etc/cron.daily/ and is controlled by
/etc/logrotate.conf and the files in /etc/logrotate.d/.
What you have to watch out for is that a bunch of common log files
aren't rotated by logrotate, most notably the files generated by
sysklogd. I typically modify systems to disable the sysklogd rotation
script and replace it with a logrotate config file.
> ...but when i try to use it i get a segfault!
> i did
> %logrotate kern.log
That's because it is probably trying to process kern.log as a logrotate
configuration file. Normally you run logrotate with no options (as noted
above this typically happens from a cron launched script). About the
only time you'd invoke logrotate directly is if you are debugging
problems and want to pass the debug switch on the command line.
As to why it segfaults instead of doping something more sane, you can
blame on the fact that logrotate is written in a rigid, compiled
language, instead of a more appropriate-to-the-task scripting language.
-Tom
--
Tom Metro
Venture Logic, Newton, MA, USA
"Enterprise solutions through open source."
Professional Profile: http://tmetro.venturelogic.com/
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the Discuss
mailing list