Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Aug 2006 10:27:03 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-hackers@FreeBSD.ORG, tdamas@gmail.com
Subject:   Re: A handy utility (at least for me)
Message-ID:  <200608300827.k7U8R3Nm060644@lurza.secnetix.de>
In-Reply-To: <f8e3d83f0608292303q7c8b42dq33e599bbc0e2e371@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Thiago Damas <tdamas@gmail.com> wrote:
 >  It can be:
 >  cd /usr/ports
 >  rm -rf */*/work

That could overflow your argument verctor if there's a
large number of work directories.

It's better to use "echo */*/work | xargs rm -rf" if
you don't know the size of the pattern expansion in
advance, especially in shell scripts.  echo is a shell-
builtin, so the argument vector limit doesn't apply.

xargs is your friend.  :-)

Best regards
   Oliver

-- 
Oliver Fromme,  secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing
Dienstleistungen mit Schwerpunkt FreeBSD: http://www.secnetix.de/bsd
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code"  (taken from comp.lang.awk FAQ)



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