Linux Grep – how to show only filenames with matches

Voila!

find . -name \*.php | xargs -n 10000 grep -snH “SOME_SEARCH_TERM”| cut -f1 -d’:’

Related posts:

  1. How to set up PPTP VPN on Ubuntu Linux
  2. Don’t run PPTP and Squid on mission critical Linux boxes

Leave a Reply

Your email address will not be published. Required fields are marked *

*


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>