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
[EMAIL PROTECTED]
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to