Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top