Menu

#43 Option to preserve modification time

closed-fixed
None
5
2016-04-23
2015-10-07
No

It would be nice if GM included an option that would preserve modification times, just like for example jpegoptim includes.

From: http://www.kokkonen.net/tjko/src/man/jpegoptim.txt

-p, --preserve
             Preserve file modification times.

This would be useful in many mass-manipulation scenarios and users could avoid making their own hacky ctime/mtime scripts (e.g. http://ubuntuforums.org/showthread.php?t=1505788).

Discussion

  • Otto Kekäläinen

    It would also be nice if GM preserved file ownership and other file attributes instead of always re-creating the file.

     
  • Glenn Randers-Pehrson

    Preserving the timestamp in a file that is changed is an untruth.

    Some time ago I caved in and put these options in pngcrush:
    -newtimestamp (Reset file modification time [default])
    -oldtimestamp (Do not reset file modification time)

    But then there's the question, "How can these two files have the same name and modification time, but different filesizes?"

     
  • Otto Kekäläinen

    Patch to implement this request is now here: https://sourceforge.net/p/graphicsmagick/patches/45/
    Thanks Niko!

     
  • Bob Friesenhahn

    Bob Friesenhahn - 2016-04-23
    • status: open --> closed-fixed
    • assigned_to: Bob Friesenhahn
     
  • Bob Friesenhahn

    Bob Friesenhahn - 2016-04-23

    As of today, this is now supported in 'mogrify' via a -preserve-timestamp option.

     

Log in to post a comment.

MongoDB Logo MongoDB