[plug] rm of contents

Leon Brooks leon at brooks.fdns.net
Sun Mar 16 19:46:03 WST 2003


On Sunday 16 March 2003 07:27 pm, Cameron Patrick wrote:
> On Sun, Mar 16, 2003 at 07:15:29PM +0800, Craig Dyke wrote:
>> Now my aim is to delete all the files in each directory but leave
>> directories intact.

> find dir -type f -print0 | xargs -0 rm

find dir -type f -exec rm -f {} \;

The -f is only needed if your system aliases rm with the -i option as a 
prophylactic measure. To find out, type `alias rm' (no quotes) at a prompt.

Cheers; Leon



More information about the plug mailing list