+ -
当前位置:首页 → 问答吧 → 进入X后的注销命令

进入X后的注销命令

时间:2011-09-12

来源:互联网

代码:
用grep 查询"23:23:15.039330"这个字符串.这个字符串在文件的后半部分.
# time grep 23:23:15.039330 tcpdump_log.txt
2011-08-30 23:23:15.039330 IP 218.61.0.144.19991

real    0m0.846s
user    0m0.627s
sys 0m0.219s
文件大小:
#ls -sh tcpdump_log.txt
747M tcpdump_log.txt

但是我感觉0.8秒连文件也读不完啊


最后由 centerpoint 编辑于 2011-09-12 11:10,总共编辑了 1 次

作者: centerpoint   发布时间: 2011-09-12

centerpoint 写道:
代码:
用grep 查询"23:23:15.039330"这个字符串.这个字符串在文件的后半部分.
# time grep 23:23:15.039330 tcpdump_log.txt
2011-08-30 23:23:15.039330 IP 218.61.0.144.19991

real    0m0.846s
user    0m0.627s
sys 0m0.219s
文件大小:
#ls -sh tcpdump_log.txt
747M tcpdump_log.txt

高和低是一对概念。grep和谁比才显示出它的高呢?

作者: 我就是我2   发布时间: 2011-09-12

纯内存操作不到1GB的数据,而且还没有正则,当然花不了多少时间.

作者: xhy   发布时间: 2011-09-12

你拿time cat比较下。

作者: tusooa   发布时间: 2011-09-12