Volker Armin Hemmann wrote:
> Am 06.06.2015 um 18:45 schrieb Joseph:
>> 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?
>
> grep -R 'whateveryourarelookingfor /path/to/directory/tree/
>
> seriously, why make everything fucking harder with find, when grep alone
> can do it for you?
>

I'm not the OP but I was not able to make 'grep -R' work properly with 
file or directory names containing spaces. I fiddled with IFS but in the 
end I found 'find -print0' was more convenient. Are there better methods 
with grep and shell alone?

raffaele

Reply via email to