Вопрос

If I download a file from

mediafire.com

and do

stat -c %y test.txt

The date and time just comes out to whenever I downloaded the file. Is there a way to download from mediafire and retain the timestamps?

Update

Based on Marc B answer, these are the Response Headers from MediaFire

HTTP/1.1 200 OK
Date: Sat, 28 Apr 2012 15:48:49 GMT
Cache-Control: no-cache, must-revalidate
Pragma: no-cache
Expires: 0
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 16328
Connection: close
Content-Type: text/html; charset=UTF-8
Server: MediaFire

The Last-Modified header is missing, so we cannot know the timestamp.

Это было полезно?

Решение

Unless mediafire outputs an appropriate header in the HTTP response, there is absolutely no way to tell what the original timestamp was, so your download app (browser? curl?) will simply use the current time.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top