我有一个 500mb 的日志文件,需要从中提取备份信息。我需要日期,然后是后面的两行。如果出现其他日期,也可以。
Fri Feb 8 00:00:02 2013
14:58:01 Level 0 Archive started on rootdbs, physdbs, logidbs, dbspace01
15:32:56 Archive on rootdbs, physdbs, logidbs, dbspace01 Completed.
谢谢
答案1
尝试grep -A2 "Fri Feb 8 00:00" /your/log/file