0 like 0 dislike
155 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.
asked Feb 25, 2014 in Education & Reference by VN (230 points) | 155 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
 

answered Feb 25, 2014 by Vikas
selected Feb 25, 2014 by VN
Thnx..Its working

Related questions

1 like 0 dislike
1 answer
0 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
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 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

Mathe Forum Schule und Studenten
1,161 questions
1,297 answers
271 comments
1,558 users