How to find all the files that contain a text string in Linux

1149900 pts.
Tags:
Linux
I'm trying to find a way to scan my whole Linux system for all of my files that contain a specific string of text. Just to clarify, I'm not looking for the file name, but the text within the file. After searching through several things, I found this solution:
find / -type f -exec grep -H 'text-to-find-here' {} ;
But it's not working...it's displaying every single file in the system. Is this code close to working? If not, what should I do?
0

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: