[MacPorts] #18952: Stray .TMP files on distfiles mirrors
MacPorts
noreply at macports.org
Sat Nov 5 00:27:52 CET 2016
#18952: Stray .TMP files on distfiles mirrors
-----------------------------+----------------------
Reporter: ryandesign | Owner: admin@…
Type: defect | Status: assigned
Priority: Low | Milestone:
Component: server/hosting | Version:
Resolution: | Keywords:
Port: |
-----------------------------+----------------------
Description changed by mojca:
Old description:
> 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.
New description:
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.
See also #44789.
--
--
Ticket URL: <https://trac.macports.org/ticket/18952#comment:8>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list