[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: find



Piszcz, Justin napisał(a):
Sort of.

find . -type '*.c' -exec grep "my_text" {} \;

No! Never use exec this way if the command you use accepts multiple arguments. Use xargs. (-type '*.c' is a mistake anyway ;->).
You should rather try
find . -type f -name '*.c' -print0 | xargs -0 grep "whatever"



Reply to: