Search a list of files for some text

/ Published in: Bash
Save to your folder(s)

Searches for some text in a list of files. Displays the results with the filename where the snippet was found.

Copy this code and paste it in your HTML
  1. find -name your_file_matcher -exec grep 'text_to_match' -H {} \;
  3. eg.
  5. find -name *.pom -exec grep 'apache' -H {} \;

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.