Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Aug 2006 01:32:46 -0400
From:      Richard Coleman <rcoleman@criticalmagic.com>
To:        freebsd-hackers@FreeBSD.ORG, rick-freebsd@kiwi-computer.com, mlobo@digiart.art.br
Subject:   Re: A handy utility (at least for me)
Message-ID:  <44F3D17E.6050405@criticalmagic.com>
In-Reply-To: <200608281618.k7SGIwWh065261@lurza.secnetix.de>
References:  <200608281618.k7SGIwWh065261@lurza.secnetix.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Oliver Fromme wrote:
> The following is probably the most efficient solution.
> It doesn't run into all subdirectories (and works with
> an arbitrary numebr of subdirectories).
> 
> cd /usr/ports; echo */*/work | xargs rm -rf
> 
> Best regards
>    Oliver
> 

So does this:

find /usr/ports -mindepth 3 -maxdepth 3 -name work -print -delete -prune

I would be surprised if the globbing in most shells was more efficient than find.  Although as 
mentioned before, nothing beats putting all the work directories in a single location, and using a 
single rm command.

Richard Coleman
rcoleman@criticalmagic.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44F3D17E.6050405>