Linux: Search inside files


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

will search all php files in the current directory and below searching inside each file for the text pattern. -l switch on grep will only print filename


Copy this code and paste it in your HTML
  1. find . -name '*.php' -exec grep -l 'my text pattern' {} \;

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.