按日期或日期范围过滤任何系统日志文件
我要实现的目标: 我想按日期(即执行时)过滤系统日志文件: $ cat /var/log/syslog | grep -i "error\|warn\|kernel" 最后三天,它会打印这样的行: (...) Apr 3 06:17:38 computer_name kernel: [517239.805470] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready (...) Apr 4 19:34:21 computer_name kernel: [517242.523165] e1000e: enp0s25 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None (...) Apr 5 09:00:52 computer_name kernel: [517242.523217] …