Pario TechnoBlob

  • Home
  • About
  • Archives
Skip to content

Pario TechnoBlob

A chronological documentation test project, nothing serious, really!

  • Home
  • About
  • Archives

Check and modify a image file date and time using exiftool

Posted on 1. September 20161. September 2016 by Hans-Henry Jakobsen

Sometimes I experience that a image files date/time on the file system differ from the image metadata/EXIF info.
I use this command to extract the date information available in the file

$ exiftool -time:all -a -G0:1 -s filename.jpg

The output from the command can be like

[File:System]   FileModifyDate                  : 2016:06:08 14:40:24+02:00
[File:System]   FileAccessDate                  : 2016:09:01 23:39:40+02:00
[File:System]   FileInodeChangeDate             : 2016:09:01 23:39:17+02:00
[EXIF:GPS]      GPSDateStamp                    : 2015:07:28
[EXIF:GPS]      GPSTimeStamp                    : 14:46:47
[EXIF:IFD0]     ModifyDate                      : 2015:07:28 16:47:09
[EXIF:ExifIFD]  CreateDate                      : 2015:07:28 16:47:09
[EXIF:ExifIFD]  SubSecTime                      : 426
[EXIF:ExifIFD]  DateTimeOriginal                : 2015:07:28 16:47:09
[EXIF:ExifIFD]  SubSecTimeDigitized             : 426
[EXIF:ExifIFD]  SubSecTimeOriginal              : 426
[Composite]     GPSDateTime                     : 2015:07:28 14:46:47Z
[Composite]     SubSecCreateDate                : 2015:07:28 16:47:09.426
[Composite]     SubSecDateTimeOriginal          : 2015:07:28 16:47:09.426
[Composite]     SubSecModifyDate                : 2015:07:28 16:47:09.426

This can give a lot of info about the original date/time of the file.
We can now decide to modify a files FileModifyDate with the info from DateTimeOriginal

$ exiftool "-filemodifydate<datetimeoriginal" filename.jpg

Source: http://www.sno.phy.queensu.ca/~phil/exiftool/faq.html#Q24

Share this:

  • Facebook
  • X
Posted in: Linux, Photo etc, ScriptingTagged: EXIF, exiftool, metadata

Post navigation

Previous: Generate IP-address ranges using simple bash script
Next: Print last Sunday of month
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Search

Apache apt-get awk backup basename bash CentOS convert csv Database dd Debian esxi5 Etch EXIF Fedora find Gentoo grep howto html imagemagick iptables iso jhead JPG mount MySQL Nikon nmap perl PHP Postfix RedHat rename rhel5 sed sftp SMTP sort ssh Ubuntu VMware Wordpress Zimbra

  • Backup
  • Linux
  • Misc
  • Network
  • Photo etc
  • Scripting
  • Security
  • Virtualization
  • Web
  • Windows

Categories

  • Backup
  • Linux
  • Misc
  • Network
  • Photo etc
  • Scripting
  • Security
  • Virtualization
  • Web
  • Windows

Tags

Apache apt-get awk backup basename bash CentOS convert csv Database dd Debian esxi5 Etch EXIF Fedora find Gentoo grep howto html imagemagick iptables iso jhead JPG mount MySQL Nikon nmap perl PHP Postfix RedHat rename rhel5 sed sftp SMTP sort ssh Ubuntu VMware Wordpress Zimbra
Resume X WordPress Theme by Wp Theme Space