From owner-freebsd-current@FreeBSD.ORG Fri Jun 30 07:57:50 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 9288816A403 for ; Fri, 30 Jun 2006 07:57:50 +0000 (UTC) (envelope-from vadimnuclight@tpu.ru) Received: from relay1.tpu.ru (relay1.tpu.ru [213.183.112.102]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77F9D43D45 for ; Fri, 30 Jun 2006 07:57:49 +0000 (GMT) (envelope-from vadimnuclight@tpu.ru) Received: by relay1.tpu.ru (Postfix, from userid 501) id EE44211C309; Fri, 30 Jun 2006 14:57:46 +0700 (NOVST) Received: from mail.main.tpu.ru (mail.main.tpu.ru [10.0.0.3]) by relay1.tpu.ru (Postfix) with ESMTP id D4F7011C305; Fri, 30 Jun 2006 14:57:46 +0700 (NOVST) Received: from mail.tpu.ru ([213.183.112.105]) by mail.main.tpu.ru with Microsoft SMTPSVC(6.0.3790.1830); Fri, 30 Jun 2006 14:57:46 +0700 Received: from nuclight.avtf.net ([82.117.64.107]) by mail.tpu.ru over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Fri, 30 Jun 2006 14:57:45 +0700 To: MonkeyBrains , freebsd-current@freebsd.org References: <44A4CBE1.9060205@MonkeyBrains.NET> Message-ID: From: "Vadim Goncharov" Organization: AVTF TPU Hostel Content-Type: text/plain; format=flowed; delsp=yes; charset=koi8-r MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Fri, 30 Jun 2006 14:56:49 +0700 In-Reply-To: <44A4CBE1.9060205@MonkeyBrains.NET> User-Agent: Opera M2/7.54 (Win32, build 3865) X-OriginalArrivalTime: 30 Jun 2006 07:57:46.0164 (UTC) FILETIME=[DFA1BF40:01C69C1A] X-Mailman-Approved-At: Fri, 30 Jun 2006 11:43:38 +0000 Cc: Subject: Re: 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 07:57:50 -0000 30.06.06 @ 13:59 MonkeyBrains wrote: > 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 portsclean -D This one-liner removes even more older distfiles. -- WBR, Vadim Goncharov