grep -A lines after find -B lines before find -n number the lines of the file and display that number before each result(s) $ grep -A20 -B20 -n 'this is what im looking for' filnameToSearch.txt