Finding all files containing a text string on Linux:
To find the list of files having the specified text,
find <location> -type f -exec grep -H '<Tex to find>' {} \;
<location> - can be any path
<Tex to find> - text to find inside the files
Example:
find /home -type f -exec grep -H 'java' {} \;
No comments:
Post a Comment