#TIL : Grep : find a string in folder

Grep is a greate tool for searching a string in files.

Syntax

1
$ grep -nr '[string]' [folder]

If you want to show surrounding lines the result, add flag -C [number] to the command

1
$ grep -nr -C 3 'hello' src