See how to use grep
to find what you’re looking for inside files:
grep
is case sensitive by default use -i
to turn this off:
$ grep -i pattern file
Search recursively into a folder:
$ grep pattern -r folder
Display 5 lines after/before each match:
$ grep -C 5 pattern file
Filter out a pattern:
grep -v pattern file
Only count pattern occurrences:
$ grep -c pattern file
Only list the files containing the pattern:
$ grep -l pattern file