[Linux-disciples] delete a whole lot of files

Adam Rosi-Kessel adam at rosi-kessel.org
Wed Feb 7 13:25:12 EST 2007


On 2/7/2007 1:19 PM, Stephen R Laniel wrote:
> On Wed, Feb 07, 2007 at 01:16:22PM -0500, Adam Rosi-Kessel wrote:
>> I think you would need
>>
>> find /home/church -iname '*.jpg' -print0 -exec '{}' rm \;
> 
> Sorry, what I meant to write was
> 
> find /home/church -iname '*.jpg' -print0 |xargs -0 rm

Oh, right. You don't want to do both -exec and -print (or -print0).

I would suggest the slight modification:

find /home/church -iname '*.jpg' -print0 |xargs -i0 rm '{}'

although in this case I don't think it would make any difference.


More information about the Linux-disciples mailing list