From owner-freebsd-hackers@FreeBSD.ORG Mon Aug 28 06:01:35 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 0F0D216A4E0 for ; Mon, 28 Aug 2006 06:01:35 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2420E43D4C for ; Mon, 28 Aug 2006 06:01:34 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id k7S5xt2N062062; Sun, 27 Aug 2006 23:59:56 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 28 Aug 2006 00:00:08 -0600 (MDT) Message-Id: <20060828.000008.228971861.imp@bsdimp.com> To: erdgeist@erdgeist.org From: "M. Warner Losh" In-Reply-To: <44F0D335.4030604@erdgeist.org> References: <200608261919.07106.mlobo@digiart.art.br> <20060826225350.GA20172@megan.kiwi-computer.com> <44F0D335.4030604@erdgeist.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 27 Aug 2006 23:59:56 -0600 (MDT) Cc: freebsd-hackers@freebsd.org, rick-freebsd@kiwi-computer.com, mlobo@digiart.art.br Subject: Re: A handy utility (at least for me) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Aug 2006 06:01:35 -0000 In message: <44F0D335.4030604@erdgeist.org> Dirk Engling writes: : Rick C. Petty wrote: : > On Sat, Aug 26, 2006 at 07:19:06PM -0300, Mario Lobo wrote: : >> My /usr/ports directory was occuping 24 gigs, of which 20 was just from the : >> 'work' directories ! : >> : >> Removing them one by one was a pain so I wrote this little utility to wipe : >> them off. : > : > I find that the following command works just fine for me: : > : > find /usr/ports -type d -name work -prune -print -delete : : And EVEN cooler is having a : : WRKDIRPREFIX= /var/ports : : in your /etc/make.conf, that way an "rm -rf /var/ports/*" cleans without : unnecessary directory recursion. I just discovered this in my quest to see how hard it would be to get ports cross building as part of some other work I've been doing... Warner