Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2079298
  • 博文数量: 470
  • 博客积分: 10206
  • 博客等级: 上将
  • 技术积分: 5620
  • 用 户 组: 普通用户
  • 注册时间: 2008-07-03 12:50
文章分类

全部博文(470)

文章存档

2012年(1)

2011年(18)

2010年(47)

2009年(404)

分类:

2009-08-03 11:35:58

| | | |
[] [] [] [] []
  帅哥
天使



CU编号: 99437
注册:2003-9-22
最后登录: 2009-08-02
帖子:
精华:







来自:guangzhou
状态:...离线...

[] [] [博客]


[]     顶部
发表于 2009-8-1 14:27 

如下的qmail日志内容,如何过滤出某个时间段的日志呢?
如何 2009-07-27 08:14 ~ 2009-07-27 08:30时间段的日志

谢谢

CODE:
2009-07-27 08:14:25.750496500 new msg 2736912
2009-07-27 08:14:25.750498500 info msg 2736912: bytes 1887 from <> qp 29669 uid 7796
2009-07-27 08:14:25.750500500 starting delivery 2786: msg 2736912 to remote anonymous@.mail1
2009-07-27 08:14:25.750502500 status: local 0/10 remote 1/60
2009-07-27 08:14:25.752405500 delivery 2786: failure: Sorry,_I_couldn't_find_any_host_named_.mail1._(#5.1.2)/
2009-07-27 08:14:25.752408500 status: local 0/10 remote 0/60
2009-07-27 08:14:25.754921500 bounce msg 2736912 qp 29671
2009-07-27 08:14:25.754990500 end msg 2736912
2009-07-27 08:14:25.756535500 new msg 2736898
2009-07-27 08:14:25.756537500 info msg 2736898: bytes 2327 from <#@[]> qp 29671 uid 7796
2009-07-27 08:14:25.756539500 starting delivery 2787: msg 2736898 to remote postmaster@mail1
2009-07-27 08:14:25.756540500 status: local 0/10 remote 1/60
2009-07-27 08:14:25.759538500 delivery 2787: failure: Sorry,_I_couldn't_find_any_host_named_mail1._(#5.1.2)/
2009-07-27 08:14:25.759683500 status: local 0/10 remote 0/60
2009-07-27 08:14:25.759752500 triple bounce: discarding bounce/2736898
2009-07-27 08:14:25.759806500 end msg 2736898
2009-07-27 08:15:13.574861500 new msg 2736839
2009-07-27 08:15:13.574891500 info msg 2736839: bytes 27062 from <[email]qa-sibp@163.com[/email]> qp 29681 uid 7791
2009-07-27 08:15:13.574912500 starting delivery 2788: msg 2736839 to local [email]yanfabu@juyho.com[/email]
2009-07-27 08:15:13.574932500 status: local 1/10 remote 0/60
2009-07-27 08:15:13.598190500 delivery 2788: success: did_1+0+0/
2009-07-27 08:15:13.598281500 status: local 0/10 remote 0/60
2009-07-27 08:15:13.598349500 end msg 2736839
2009-07-27 08:18:53.817083500 new msg 2736898
2009-07-27 08:18:53.817086500 info msg 2736898: bytes 1061780 from <[email]sibp@163.com[/email]> qp 30437 uid 7791
2009-07-27 08:18:53.817088500 starting delivery 2789: msg 2736898 to local [email]zhuwei@juyho.com[/email]
2009-07-27 08:18:53.817090500 status: local 1/10 remote 0/60
2009-07-27 08:18:53.933045500 delivery 2789: success: did_1+0+0/
2009-07-27 08:18:53.933140500 status: local 0/10 remote 0/60
2009-07-27 08:18:53.933209500 end msg 2736898
2009-07-27 08:19:28.033071500 new msg 2736839
2009-07-27 08:19:28.033074500 info msg 2736839: bytes 1366 from qp 30371 uid 0
2009-07-27 08:19:28.033076500 starting delivery 2790: msg 2736839 to remote root@.mail1
2009-07-27 08:19:28.033078500 status: local 0/10 remote 1/60




您对本贴的看法:

__________________________________

http://blog.eissue.cn
如果朋友让你生气,那是因为你仍然在意他的友情......

| | |
  帅哥 (Tim)
法师


CU奥运火炬传递手2008
CU编号: 465018
注册:2006-9-13
最后登录: 2009-08-03
帖子:
精华:0







来自:长春
状态:...在线...

[] [] [博客]


[]     顶部
发表于 2009-8-1 15:11 

awk '$1" "$2>"2009-07-27 08:14" && $1" "$2<"2009-07-27 08:30"' urfile



您对本贴的看法:

__________________________________

记住该记住的,忘记该忘记的。改变能改变的,接受不能改变的。
| | |
  帅哥
天使



CU编号: 99437
注册:2003-9-22
最后登录: 2009-08-02
帖子:
精华:







来自:guangzhou
状态:...离线...

[] [] [博客]


[]     顶部
发表于 2009-8-2 08:38 



QUOTE:
原帖由 ly5066113 于 2009-8-1 15:11 发表
awk '$1" "$2>"2009-07-27 08:14" && $1" "$2

如果使用一个script去执行, ' 岂不是把 $给屏蔽掉吗?



您对本贴的看法:

__________________________________

http://blog.eissue.cn
如果朋友让你生气,那是因为你仍然在意他的友情......

| | |
  帅哥
侠客




CU编号: 1691341
注册:2009-5-19
最后登录: 2009-08-02
帖子:
精华:0







状态:...离线...

[] [] [博客]


[]     顶部
发表于 2009-8-2 08:55 

回复 #2 ly5066113 的帖子

我才知道还可以这样比较大小,Tim,强淫啊。



您对本贴的看法:
| | |
  帅哥 (Boy)
风云使者
永远的学生



CU编号: 232643
注册:2005-3-3
最后登录: 2009-08-02
帖子:
精华:0







状态:...离线...

[] [] [博客]


[]     顶部
发表于 2009-8-2 09:38 

佩服,这个方法都能像的出来!



您对本贴的看法:

__________________________________

不断学习,不断进步!!!
BASH SHELL|LINUX C 学习中...
向前看,前面才会有彩虹!


http://linuxboy823.cublog.cn
| | |
  帅哥 (Tim)
法师


CU奥运火炬传递手2008
CU编号: 465018
注册:2006-9-13
最后登录: 2009-08-03
帖子:
精华:0







来自:长春
状态:...在线...

[] [] [博客]


[]     顶部
发表于 2009-8-2 09:57 

回复 #3 netocool 的帖子




您对本贴的看法:

__________________________________

记住该记住的,忘记该忘记的。改变能改变的,接受不能改变的。
| | |
  帅哥
风云使者



CU编号: 178761
注册:2004-8-23
最后登录: 2009-08-02
帖子:
精华:







状态:...离线...

[] [] [博客]


[]     顶部
发表于 2009-8-2 12:53 

[root@test200 ~]# sed -n '/2009-07-27 08:14/,/2009-07-27 08:15/p' test
2009-07-27 08:14:25.750496500 new msg 2736912
2009-07-27 08:14:25.750498500 info msg 2736912: bytes 1887 from <> qp 29669 uid 7796
2009-07-27 08:14:25.750500500 starting delivery 2786: msg 2736912 to remote anonymous@.mail1
2009-07-27 08:14:25.750502500 status: local 0/10 remote 1/60
2009-07-27 08:14:25.752405500 delivery 2786: failure: Sorry,_I_couldn't_find_any_host_named_.mail1._(#5.1.2)/
2009-07-27 08:14:25.752408500 status: local 0/10 remote 0/60
2009-07-27 08:14:25.754921500 bounce msg 2736912 qp 29671
2009-07-27 08:14:25.754990500 end msg 2736912
2009-07-27 08:14:25.756535500 new msg 2736898
2009-07-27 08:14:25.756537500 info msg 2736898: bytes 2327 from <#@[]> qp 29671 uid 7796
2009-07-27 08:14:25.756539500 starting delivery 2787: msg 2736898 to remote postmaster@mail1
2009-07-27 08:14:25.756540500 status: local 0/10 remote 1/60
2009-07-27 08:14:25.759538500 delivery 2787: failure: Sorry,_I_couldn't_find_any_host_named_mail1._(#5.1.2)/
2009-07-27 08:14:25.759683500 status: local 0/10 remote 0/60
2009-07-27 08:14:25.759752500 triple bounce: discarding bounce/2736898
2009-07-27 08:14:25.759806500 end msg 2736898
2009-07-27 08:15:13.574861500 new msg 2736839

[ 本帖最后由 squall1 于 2009-8-2 12:55 编辑 ]



您对本贴的看法:
| | |
  帅哥
老法王


CU奥运火炬传递手2008
荣誉会员  
CU编号: 187152
注册:2004-10-1
最后登录: 2009-08-02
帖子:
精华:







来自:北京海淀
状态:...离线...

[] [] [博客]


[]     顶部
发表于 2009-8-2 13:23 



QUOTE:
原帖由 ly5066113 于 2009-8-1 15:11 发表
awk '$1" "$2>"2009-07-27 08:14" && $1" "$2

学习~~ :mrgreen:



您对本贴的看法:

__________________________________

孰能浊以静之徐清?
孰能安以动之徐生?
| | |
  帅哥
天使



CU编号: 99437
注册:2003-9-22
最后登录: 2009-08-02
帖子:
精华:







来自:guangzhou
状态:...离线...

[] [] [博客]


[]     顶部
发表于 2009-8-2 22:47 

如果使用一个script去执行, ' 岂不是把 $给屏蔽掉吗?



您对本贴的看法:

__________________________________

http://blog.eissue.cn
如果朋友让你生气,那是因为你仍然在意他的友情......

| | |

» » »

阅读(434) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~