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

> On 06/06/15 20:09, Alexander Kapshuk wrote:
>
>    On Sat, Jun 6, 2015 at 7:45 PM, Joseph <[1]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'
>>
>
> Thanks, this worked for me, it searches in current and below dir.
>
>
>
Good to hear.

Reply via email to