I want to search for a string in a large gz file and also want to check some text i.e. 10 lines above and below it. … i cannot use any editor search facility because it takes a very long time to load in memory and sometimes the editors even crash on opening the file. What would be the best way to search through this very large file for some search string like
4296708614 for eg .. Any unix utility that would be handy ? or if i could write a language code for it in Java or groovy ?
I want to search for a string in a large gz file and also
Share
Plain old grep will do. Pass in
-C Nto display N lines of context around each match.