From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 30 08:27:15 2006 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.ORG Delivered-To: freebsd-hackers@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7C99216A4E1 for ; Wed, 30 Aug 2006 08:27:15 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D58C43D78 for ; Wed, 30 Aug 2006 08:27:11 +0000 (GMT) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (zcdsdy@localhost [127.0.0.1]) by lurza.secnetix.de (8.13.4/8.13.4) with ESMTP id k7U8R31G060645; Wed, 30 Aug 2006 10:27:09 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.13.4/8.13.1/Submit) id k7U8R3Nm060644; Wed, 30 Aug 2006 10:27:03 +0200 (CEST) (envelope-from olli) Date: Wed, 30 Aug 2006 10:27:03 +0200 (CEST) Message-Id: <200608300827.k7U8R3Nm060644@lurza.secnetix.de> From: Oliver Fromme To: freebsd-hackers@FreeBSD.ORG, tdamas@gmail.com In-Reply-To: X-Newsgroups: list.freebsd-hackers User-Agent: tin/1.8.0-20051224 ("Ronay") (UNIX) (FreeBSD/4.11-STABLE (i386)) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Wed, 30 Aug 2006 10:27:09 +0200 (CEST) Cc: Subject: Re: A handy utility (at least for me) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-hackers@FreeBSD.ORG, tdamas@gmail.com List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2006 08:27:15 -0000 Thiago Damas 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)