Try to delete files
Hi all, Hi, in my years of using freebsd i have collected alot of distfiles in the ports tree and i want to free up some space on my harddrive and i was wondering is there a command to delete files in the distfiles folder that are less than the year 2000? Or maybe there is a program that deletes all the older releases in the distfiles? if someone could help i would be gratefully Thanks Nigel Taylor ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Try to delete files
Hi, > Hi, in my years of using freebsd i have collected alot of distfiles in > the ports tree and i want to free up some space on my harddrive and i > was wondering is there a command to delete files in the distfiles folder > that are less than the year 2000? > > Or maybe there is a program that deletes all the older releases in the > distfiles? if someone could help i would be gratefully Yes, there is one included in the sysutils/portupgrade port: 'portsclean -CD' will erase all of your stale distfiles and work directories (see the man page for more switches). In case you didn't know portupgrade(1), you really have to check it out. It's a must-have :-) Cheers, Simon signature.asc Description: Digital signature
Re: Try to delete files
On Thu, Jul 10, 2003 at 07:21:42PM +0800, Nigel Taylor wrote: > Hi all, > > Hi, in my years of using freebsd i have collected alot of distfiles in > the ports tree and i want to free up some space on my harddrive and i > was wondering is there a command to delete files in the distfiles folder > that are less than the year 2000? > > Or maybe there is a program that deletes all the older releases in the > distfiles? if someone could help i would be gratefully portsclean -D will delete all distfiles that aren't referenced by any of the ports currently under /usr/ports. portsclean -DD will delete all distfiles which aren't referenced by any currently installed port or package. portsclean(1) is part of the portupgrade suite of tools. Otherwise, you can find all of the files older than a certain date by: # cd /usr/ports/distfiles # touch -t 2101 datestamp # find . \! -newer datestamp -type f -print Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
Re: Try to delete files
On Thursday 10 July 2003 06:21 am, Nigel Taylor wrote: > Hi all, > > Hi, in my years of using freebsd i have collected alot of distfiles > in the ports tree and i want to free up some space on my harddrive > and i was wondering is there a command to delete files in the > distfiles folder that are less than the year 2000? > > Or maybe there is a program that deletes all the older releases in > the distfiles? if someone could help i would be gratefully Install /usr/ports/sysutils/portupgrade Then "portsclean -CD" to remove "work" files from /usr/ports/ and to remove all non-referenced files in /usr/ports/distfiles/ Its not safe to delete distfiles older than 2000 because a very large number of current distfiles are much older than that. Use "ls -lt" to see for yourself after having cleaned up with portsclean. -- David Kelly N4HHE, [EMAIL PROTECTED] = The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Try to delete files
For academic purposes, I'll provide this explanation. Use find; this command would delete any files modified more than one year ago. Find /usr/ports -mtime +365 -xargs rm -ri {} \; Luke > From: Nigel Taylor <[EMAIL PROTECTED]> > Date: Thu, 10 Jul 2003 19:21:42 +0800 > To: [EMAIL PROTECTED] > Subject: Try to delete files > > Hi all, > > Hi, in my years of using freebsd i have collected alot of distfiles in > the ports tree and i want to free up some space on my harddrive and i > was wondering is there a command to delete files in the distfiles folder > that are less than the year 2000? > > Or maybe there is a program that deletes all the older releases in the > distfiles? if someone could help i would be gratefully > > Thanks > > Nigel Taylor > > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "[EMAIL PROTECTED]" > ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Try to delete files
On Thursday 10 July 2003 10:27 am, Luke Cowell wrote: > For academic purposes, I'll provide this explanation. > > Use find; this command would delete any files modified more than one > year ago. > > Find /usr/ports -mtime +365 -xargs rm -ri {} \; That works but is not a very good idea. My distfiles were recently scoured with "portsclean -D" and this is the result: % find /usr/ports/distfiles/ -type f -mtime +365 | wc -l 373 In other words I have 373 current distfiles which are over 365 days old. -- David Kelly N4HHE, [EMAIL PROTECTED] = The human mind ordinarily operates at only ten percent of its capacity -- the rest is overhead for the operating system. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"