<div dir="ltr">On Sat, Jun 6, 2015 at 8:46 PM, Joseph <span dir="ltr">&lt;<a href="mailto:syscon780@gmail.com" target="_blank">syscon780@gmail.com</a>&gt;</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 &lt;[1]<a href="mailto:syscon780@gmail.com" target="_blank">syscon780@gmail.com</a>&gt; wrote:<br>
<br>
    I&#39;ve bunch of php files in many directories and I need to file a<br>
    text string in them &quot;Check/Money Order&quot;<br>
    I&#39;ve tried:<br>
    find -type f -print0 | xargs -r0 grep -F &#39;Check/Money Order&#39;<br>
    it doesn&#39;t work.<br>
    What is a better method of searching files?<br>
    --<br>
    Joseph<br>
<br>
  grep -ls &#39;Check/Money Order&#39; `du -a | sed &#39;/\.php$/!d;s/.*\t//&#39;` # 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 &#39;Check/Money Order&#39;<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>