Finding all files containing a text string on Linux or Mac

Last updated on March 20th, 2020 at 08:41 pm

I need to find some string in all folders.

[code lang=”bash”]
grep -rnw ‘./folder/’ -e “search-text”
[/code]

Note:

  • -r is recursive
  • -n is line number
  • -w stands match the whole word

Tags:

Discover more from Juzhax Technology

Subscribe now to keep reading and get access to the full archive.

Continue reading