On Thu, November 16, 2006 9:57 pm, Stuart Clark wrote:
> Syslogd does the HUP thing, so a killall -HUP syslogd should be what you
> need.
>
> I would also suggest adjusting the order of your script, so that the log
> is moved, reopened (HUP) then compressed, as a log line sent to the
> still open log file during or after compression will probably break
> things.

I think you can get away with just nulling the messages file out after
cat'ing it through gzip:

cat /var/log/messages | gzip > /var/log/messages.gz
>/var/log/messages

The latter command starts with a '>' - this is the same as 'cat /dev/null >'.

> Have you looked at "logrotate" which does all of the above, and is
> fairly standard?

Regards,
Malcolm
-- 
Technical copy-editor & proofreader

KDE Proofreading Team
KDE British English Translation Team

http://i18n.kde.org/teams/info/en_GB


_______________________________________________
Peterboro mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/peterboro

Reply via email to