When downloading a file or e.g. unzipping one, the time stamp is not set to when the file appeared on my harddisk, which is what I want.

See this example

~$ wget https://www.google.com/images/srpr/logo3w.png
~$ stat logo3w.png 
  File: `logo3w.png'
  Size: 7007        Blocks: 16         IO Block: 4096   regular file
Device: fd00h/64768d    Inode: 17040834    Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/      ss)   Gid: ( 1000/      ss)
Access: 2012-07-25 10:58:26.000000000 +0200
Modify: 2012-04-02 04:13:37.000000000 +0200
Change: 2012-07-25 10:58:26.254385152 +0200
 Birth: -
~$ ll logo3w.png 
-rw-rw-r-- 1 ss ss 7007 Apr  2 04:13 logo3w.png

This behaviour is "new" and has happens within the last couple of years.


Is it possible to disable this, so when a file is written to disk, it gets the time stamp when I did it?

  • This happens because the application you used to download or unzip explicitly resets the file's date. It does this because that's the useful behavior most of the time. I doubt your assertion that this didn't use to happen: this behavior doesn't tend to change over time, are you sure you were using the same application a couple of years ago? – Gilles 'SO- stop being evil' Jul 25 '12 at 22:46
  • @Gilles: For example, wget 1.12 we have at work does not have the --no-use-serer-timestamps option. It resets the file's date, of course. – choroba Jul 25 '12 at 23:14

From the wget man page:


Don't set the local file's timestamp by the one on the server.

By default, when a file is downloaded, its timestamps are set to match those from the remote file. This allows the use of --timestamping on subsequent invocations of wget. However, it is sometimes useful to base the local file's timestamp on when it was actually downloaded; for that purpose, the --no-use-server-timestamps option has been provided.

unzip also has a -DD option to skip restoration of timestamps for extracted items.

From man unzip:


skip restoration of timestamps for extracted items.

Normally, unzip tries to restore all meta-information for extracted items that are supplied in the Zip archive (and do not require privileges or impose a security risk).

By specifying -D, unzip is told to suppress restoration of timestamps for directories explicitly created from Zip archive entries. [...]

The duplicated option -DD forces suppression of timestamp restoration for all extracted entries (files and directories). This option results in setting the timestamps for all extracted entries to the current time.


As seen in How to create an RPM package:

add the text timestamping = on to ~/.wgetrc

so I'd imagine doing

timestamping = off

will do it


I do not see any such option for my version of wget. Maybe you can just touch everything you download?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.