Finding all files containing a text string on Linux or Mac

I need to find some string in all folders.

grep -rnw './folder/' -e "search-text"


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


Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.