Re: [Nolug] find folder delete contents

From: -ray <ray_at_ops.selu.edu>
Date: Tue, 13 Dec 2005 20:10:54 -0600 (CST)
Message-ID: <Pine.LNX.4.61.0512132008140.1116@romulus.csd.selu.edu>

On Tue, 13 Dec 2005, John Kosta wrote:

> So:
> find /path -type d -name "*[Cc]ache*" -print -exec "rm -f {}/*.*" \;
>
> doesn't work, because of M$'s
> "Application Data/"

Are you on linux? This works on debian. You may run into problems with
other shell characters in filenames though (',",&,$,etc...).

find . -type d -name '*[Cc]ache*' -exec rm -rf \"{}\" \;

ray

___________________
Nolug mailing list
nolug@nolug.org
Received on 12/13/05

This archive was generated by hypermail 2.2.0 : 12/19/08 EST