How do I find all files containing specific text on Linux?

find / -type f -exec grep -H 'text-to-find-here' {} \; 

grep -rnw '/path/to/somewhere/' -e 'pattern' 

grep -Ril "text-to-find-here" /

ack 'text-to-find-here'
  •  
  •  
  •  
  •  

Viet Luu has written 280 articles

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

We are thankful for your never ending support.

Leave a Reply