one liner to clean up your /usr/ports/distfiles
- From: MonkeyBrains <crapsh@xxxxxxxxxxxxxxxx>
- Date: Thu, 29 Jun 2006 23:59:45 -0700
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
_______________________________________________
freebsd-current@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@xxxxxxxxxxx"
- Follow-Ups:
- Re: one liner to clean up your /usr/ports/distfiles
- From: Vadim Goncharov
- Re: one liner to clean up your /usr/ports/distfiles
- From: Dmitry Pryanishnikov
- Re: one liner to clean up your /usr/ports/distfiles
- From: Maxim Sobolev
- Re: one liner to clean up your /usr/ports/distfiles
- Prev by Date: [head tinderbox] failure on i386/pc98
- Next by Date: Re: one liner to clean up your /usr/ports/distfiles
- Previous by thread: More module build problems
- Next by thread: Re: one liner to clean up your /usr/ports/distfiles
- Index(es):
Relevant Pages
|
|