From owner-freebsd-current@FreeBSD.ORG Fri Jun 30 06:59:35 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7B99C16A40F for ; Fri, 30 Jun 2006 06:59:35 +0000 (UTC) (envelope-from crapsh@MonkeyBrains.NET) Received: from mail.monkeybrains.net (mail.simplestar.com [207.7.142.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F29F441DE for ; Fri, 30 Jun 2006 06:59:33 +0000 (GMT) (envelope-from crapsh@MonkeyBrains.NET) Received: from [10.0.1.6] (c-71-198-108-137.hsd1.ca.comcast.net [71.198.108.137]) (authenticated bits=0) by mail.monkeybrains.net (8.13.7/8.13.7) with ESMTP id k5U6xVCH047472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 29 Jun 2006 23:59:32 -0700 (PDT) (envelope-from crapsh@MonkeyBrains.NET) Message-ID: <44A4CBE1.9060205@MonkeyBrains.NET> Date: Thu, 29 Jun 2006 23:59:45 -0700 From: MonkeyBrains User-Agent: Thunderbird 1.5.0.4 (Macintosh/20060530) MIME-Version: 1.0 To: freebsd-current@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV version 0.88.2, clamav-milter version 0.88.2 on mail.monkeybrains.net X-Virus-Status: Clean Subject: one liner to clean up your /usr/ports/distfiles X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jun 2006 06:59:35 -0000 Ever notice your /usr/ports/distfiles bloats after several years of updating the same box? You know those 5 year old drives are about to fail, but, if you want to clean them up a bit, I like this: cd /usr/ports/distfiles perl -e 'while (<*>) { chomp(); $p = $_; $p =~ s/\-\d+\..*// or next; unlink $X if $X =~ /^$p/; $X = $_;}' Removes the lower version number of 'double' source files, like these: -rw-r--r-- 1 root wheel 1282627 Sep 12 2005 tiff-3.7.4.tar.gz -rw-r--r-- 1 root wheel 1336295 Mar 23 07:15 tiff-3.8.2.tar.gz Rudy