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

RE: find



Yeah, best not to write e-mails when answering the phone.

-name would be better.

-----Original Message-----
From: Mariusz Kruk [mailto:kruk@rdc.pl] 
Sent: Wednesday, October 26, 2005 9:55 AM
To: debian-user@lists.debian.org
Subject: 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"


-- 
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: