Add support for bzip2ed log files.

This commit is contained in:
Stefan Eßer 2003-01-05 21:32:50 +00:00
parent c8e03f61aa
commit 2068678af4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108727
3 changed files with 21 additions and 3 deletions

View File

@ -14,7 +14,13 @@ fi
catmsgs() {
find /var/log -name 'messages.*' -mtime -2 |
sort -t. -r -n -k 2,2 |
xargs zcat -f
while read f
do
case $f in
*.gz) zcat -f $f;;
*.bz2) bzcat -f $f;;
esac
done
[ -f /var/log/messages ] && cat /var/log/messages
}

View File

@ -45,7 +45,13 @@ yesterday=`date -v-1d "+%b %e "`
catmsgs() {
find ${LOG} -name 'auth.log.*' -mtime -2 |
sort -t. -r -n -k 2,2 |
xargs zcat -f
while read f
do
case $f in
*.gz) zcat -f $f;;
*.bz2) bzcat -f $f;;
esac
done
[ -f ${LOG}/auth.log ] && cat $LOG/auth.log
}

View File

@ -45,7 +45,13 @@ yesterday=`date -v-1d "+%b %e "`
catmsgs() {
find ${LOG} -name 'messages.*' -mtime -2 |
sort -t. -r -n -k 2,2 |
xargs zcat -f
while read f
do
case $f in
*.gz) zcat -f $f;;
*.bz2) bzcat -f $f;;
esac
done
[ -f ${LOG}/messages ] && cat $LOG/messages
}