2 # Log viewer program. Pass it parameters of the logs to view, or it will
3 # automatically view some.
10 # If I am root, look at all logs, otherwise only those that are
13 $perm='-perm +6' if $? != 0;
15 @logfiles=split /\n/, `find $logdir -type f -regex '.*.log' ! -name faillog ! -name lastlog $perm`;
16 push @logfiles, "$logdir/mail.err", "$logdir/mail.warn";
19 if (-e $ENV{HOME}."/.xsession-errors") {
20 push @logfiles, $ENV{HOME}."/.xsession-errors";
23 # Tail without wasting the last line of the screen.
24 open(TAIL, "tail -q --follow=name --retry -n 2 @logfiles|");