Hmm, the last time I asked this question nobody answered me.

so I wrote this:

#!/bin/sh

QMAIL=`ls /var/log/qmail | grep @ | tail -n 1`
QMAILS=`ls /var/log/qmail/qmail-smtpd | grep @ | tail -n 1`

tail -f /var/log/daemon.log /var/log/auth.log /var/log/xferlog \
/var/log/mail.log /var/log/kern.log /var/log/cfingerd.log \
/var/log/xntpd /var/log/qmail/$QMAIL /var/log/qmail/qmail-smtpd/$QMAILS

I don't have an excessively high volume of mail, and I use rather large
cyclog files, so this works well, my syslog logfiles are rotated much more
often, causing me to have to break out of this script and restart it anyway.

BTW, the tail that ships with most linux's will let you tail -f more than
one file.

--Adam

Reply via email to