Grep is a greate tool for searching a string in files.
Syntax
$ grep -nr '[string]' [folder]
If you want to show surrounding lines the result, add flag -C [number]
to the command
$ grep -nr -C 3 'hello' src
Grep is a greate tool for searching a string in files.
Syntax
$ grep -nr '[string]' [folder]
If you want to show surrounding lines the result, add flag -C [number]
to the command
$ grep -nr -C 3 'hello' src
Sound good ?
0 kudos, click the star if you think this post is value !
Read more
about #til