日志前面有时间戳
#!/bin/sh
LC_ALL=c //临时更外系统语言环境为英文
a_time=`date -d '10 minute ago' '+%b %d %H:%M'`
n_time=`date -d now '+%b %d %T'`
sed -n "/${a_time}:[0-60]/,/${n_time}/p" /data/log/unbound/unbound.log
日志前面有时间戳
#!/bin/sh
LC_ALL=c //临时更外系统语言环境为英文
a_time=`date -d '10 minute ago' '+%b %d %H:%M'`
n_time=`date -d now '+%b %d %T'`
sed -n "/${a_time}:[0-60]/,/${n_time}/p" /data/log/unbound/unbound.log