[MacPorts] #18952: Stray .TMP files on distfiles mirrors

MacPorts noreply at macports.org
Mon Mar 23 22:24:09 PDT 2009


#18952: Stray .TMP files on distfiles mirrors
-------------------------------------+--------------------------------------
 Reporter:  ryandesign@…             |       Owner:  wsiegrist@…           
     Type:  defect                   |      Status:  new                   
 Priority:  Low                      |   Milestone:                        
Component:  server/hosting           |     Version:                        
 Keywords:                           |        Port:                        
-------------------------------------+--------------------------------------
 It seems that sometimes the distfiles mirror gets interrupted while
 downloading a file, and then a
 [http://www.google.com/search?q=site%3Adistfiles.macports.org+"gz.TMP"+OR+"bz2.TMP"+OR+"zip.TMP"
 .TMP file gets left behind]. This is a bit untidy and it would be nice if
 the .TMP files could be cleaned up automatically so that they don't appear
 when browsing the distfiles servers' directory listings.

 Perhaps a cron task could be installed to periodically clean it up. For
 example, it could run this command:

 {{{
 find /path/to/distfiles -type f -name '*.TMP' \! -newermt '1 hour ago'
 -delete
 }}}

 This would find and delete files in /path/to/distfiles whose names end
 with ".TMP" and that were last modified more than an hour ago.

 If you just want to see what files would be deleted without deleting them,
 remove "`-delete`" from the command:

 {{{
 find /path/to/distfiles -type f -name '*.TMP' \! -newermt '1 hour ago'
 }}}

 The "1 hour" figure is picked a bit at random, but you want some nonzero
 value in there; you wouldn't want to clean up .TMP files that are
 currently being downloaded.

-- 
Ticket URL: <http://trac.macports.org/ticket/18952>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list