A***g 发帖数: 158 | 1 I have a 300MB text log file and want to see the lines around
400000, how can I extract the +/-1000 lines around that?
Thanks! |
m*****e 发帖数: 4193 | 2 man head, tail
【在 A***g 的大作中提到】 : I have a 300MB text log file and want to see the lines around : 400000, how can I extract the +/-1000 lines around that? : Thanks!
|
A***g 发帖数: 158 | 3 i know...
when I grep -n error filename, the line number shows 404055
and then i used head -410000 filename > headoffile
but then the error is missing from this file...
kind of weird but want to know if there is other way i can extract it....
【在 m*****e 的大作中提到】 : man head, tail
|
A***g 发帖数: 158 | 4 ft. did a head again and it is there now.....
【在 A***g 的大作中提到】 : i know... : when I grep -n error filename, the line number shows 404055 : and then i used head -410000 filename > headoffile : but then the error is missing from this file... : kind of weird but want to know if there is other way i can extract it....
|