I have a folder with big files (few GB each). I would like to search a
PATTERNthrough these files. I can do this with
$ grep -n 'PATTERN' /path/to/files/*.log
Now, I have a list with all lines including
PATTERN. However, I need some area includes these lines to see context: few lines before
PATTERN occurs and few lines after it occurs. I would prefer to list these line blocks with coordinates of each (file and line number). How it can be done?