grep -r -c theStringYouWantToFind * | grep -v :0
The first grep looks for your string theStringYouWantToFind in all files * and folders -r and returns how often -c the string has been found in each file.
The second grep shows only the files where the search result was higher then 0.
No comments:
Post a Comment