<div dir="ltr">On Sat, Jun 6, 2015 at 8:46 PM, Joseph <span dir="ltr"><<a href="mailto:syscon780@gmail.com" target="_blank">syscon780@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 06/06/15 20:09, Alexander Kapshuk wrote:<div><div class="h5"><br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> On Sat, Jun 6, 2015 at 7:45 PM, Joseph <[1]<a href="mailto:syscon780@gmail.com" target="_blank">syscon780@gmail.com</a>> wrote:<br> <br> I've bunch of php files in many directories and I need to file a<br> text string in them "Check/Money Order"<br> I've tried:<br> find -type f -print0 | xargs -r0 grep -F 'Check/Money Order'<br> it doesn't work.<br> What is a better method of searching files?<br> --<br> Joseph<br> <br> grep -ls 'Check/Money Order' `du -a | sed '/\.php$/!d;s/.*\t//'` # grep<br> will complain that the args list is too long if the number of files<br> found is too great.<br> Otherwise, this might work for you:<br> find dir -type f -name \*.php | xargs grep -sl 'Check/Money Order'<br> </blockquote> <br></div></div> Thanks, this worked for me, it searches in current and below dir.<div class="HOEnZb"><div class="h5"><br> <br></div></div></blockquote><div><br></div><div>Good to hear.<br><br></div></div><br></div></div>