A handy utility (at least for me)
Richard Coleman
rcoleman at criticalmagic.com
Tue Aug 29 05:32:48 UTC 2006
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 at criticalmagic.com
More information about the freebsd-hackers
mailing list