Powered By Blogger

Monday, April 7, 2014

Splitting of the log file

split -b 1024k


Splitting based on some keyword

grep -n 'keyword'
ex: grep -n 'batch12' out.log




grep -n 'batch17' out.log_12_12_2013_sloweringestion
Get the first line and last line ex (4132522,6834429)

tail -n +4132522 out.log_12_12_2013_sloweringestion | head -2701907 > batch17_part1and2_out.log


tail –n+(startnumber) filetobeparsed | head –(6834429 - 4132522,) > outfile.log


More Details can be found in

http://www.thegeekstuff.com/2009/08/10-awesome-examples-for-viewing-huge-log-files-in-unix/

No comments:

Post a Comment