Re: A handy utility (at least for me)
- From: Richard Coleman <rcoleman@xxxxxxxxxxxxxxxxx>
- Date: Tue, 29 Aug 2006 01:32:46 -0400
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@xxxxxxxxxxxxxxxxx
_______________________________________________
freebsd-hackers@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: A handy utility (at least for me)
- From: Oliver Fromme
- Re: A handy utility (at least for me)
- References:
- Re: A handy utility (at least for me)
- From: Oliver Fromme
- Re: A handy utility (at least for me)
- Prev by Date: Re: Hard disk going-bad detection
- Next by Date: Re: A handy utility (at least for me)
- Previous by thread: Re: A handy utility (at least for me)
- Next by thread: Re: A handy utility (at least for me)
- Index(es):
Relevant Pages
|