Claim your Biolink Click Here
0 like 0 dislike
375 views
I was trying to find a way to scan my entire linux system for all files containing a specific string of text. Just to clarify, I am looking for text within the file, not in the file name.
in Education & Reference by (150 points) | 375 views

1 Answer

1 like 0 dislike
Best answer

To search in a whole folder where sub folders exists
grep -r 'Test String' /var/www/html/Folder/


To search in a single folder with extension of a file
grep -r 'Test String' /var/www/html/Folder/*.php
 

by
selected by
0 0
Thnx..Its working

Related questions

1 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
0 like 0 dislike
1 answer
1 like 0 dislike
1 answer
1 like 0 dislike
1 answer
1 like 0 dislike
1 answer
2 like 0 dislike
1 answer

Where your donation goes
Technology: We will utilize your donation for development, server maintenance and bandwidth management, etc for our site.

Employee and Projects: We have only 15 employees. They are involved in a wide sort of project works. Your valuable donation will definitely boost their work efficiency.

How can I earn points?
Awarded a Best Answer 10 points
Answer questions 10 points
Asking Question -20 points

1,308 questions
1,469 answers
568 comments
4,809 users