mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 10:19:26 +00:00
Add support for bzip2ed log files.
This commit is contained in:
parent
c8e03f61aa
commit
2068678af4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=108727
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user