On Sat, Jun 6, 2015 at 7:45 PM, Joseph <syscon...@gmail.com> wrote:

> I've bunch of php files in many directories and I need to file a text
> string in them "Check/Money Order"
>
> I've tried:
> find -type f -print0 | xargs -r0 grep -F 'Check/Money Order'
> it doesn't work.
>
> What is a better method of searching files?
> --
> Joseph
>
>
grep -ls 'Check/Money Order' `du -a | sed '/\.php$/!d;s/.*\t//'` # grep
will complain that the args list is too long if the number of files found
is too great.

Otherwise, this might work for you:

find dir -type f -name \*.php | xargs grep -sl 'Check/Money Order'

Reply via email to