[SOLVED] exiftool and Date/Time Original

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Martin1001
Level 4
Level 4
Posts: 406
Joined: Sat Mar 28, 2020 7:19 am
Location: Plymouth, UK

[SOLVED] exiftool and Date/Time Original

Post by Martin1001 »

I've been using

Code: Select all

exiftool file.name |grep -i date
to extract exif data for a specific photo-image file.

Today I accidentally entered

Code: Select all

exiftool file.name !grep -i date
and the result was that exif data was returned for every photo-image file in the directory.

Unsurprisingly it also works with

Code: Select all

exiftool !grep -i date
Is there a command that will return, for every photo-image file in the directory
'File Name'
'Date/Time Original'
and nothing else?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Linux Mint 21.2 Cinnamon. 15.6 GiB. 1001.3 GB. Lenovo Thinkpad.
t42
Level 11
Level 11
Posts: 3725
Joined: Mon Jan 20, 2014 6:48 pm

Re: exiftool and Date/Time Original

Post by t42 »

Try

Code: Select all

exiftool -createdate *
as for the exclamation mark probably you are understanding (based on your "Unsurprisingly") that you invoke the last instance of that command from history.
-=t42=-
Martin1001
Level 4
Level 4
Posts: 406
Joined: Sat Mar 28, 2020 7:19 am
Location: Plymouth, UK

Re: exiftool and Date/Time Original

Post by Martin1001 »

t42, actually I have very little understanding at all of terminal commands. Since my mistyped command clearly ignored file.name, it seemed superfluous, so I tried it again omitting that detail.

Thank you for supplying the command. That's really useful.

Guessing from what you supplied, I tried

Code: Select all

exiftool -createdate -datetimeoriginal *
which resulted either in identical values for both 'Create Date' and 'Date/Time Original', or only a value for 'Create Date'.
======== AAA.JPG
Create Date : 2019:12:10 20:22:42
Date/Time Original : 2019:12:10 20:22:42
======== BBB.JPG
Create Date : 2020:10:12 09:37:50
Date/Time Original : : : : :
Might 'Create Date' and 'Date/Time Original' ever return different values? What I am after is the date that the photograph was taken, using images taken on my own cameras (Nikon and Sony). Recently I've been checking the values returned by Date/Time Original against known days that certain photographs were taken, and that's exactly what it seems to return consistently.
Linux Mint 21.2 Cinnamon. 15.6 GiB. 1001.3 GB. Lenovo Thinkpad.
t42
Level 11
Level 11
Posts: 3725
Joined: Mon Jan 20, 2014 6:48 pm

Re: exiftool and Date/Time Original

Post by t42 »

Martin1001 wrote: Mon May 10, 2021 4:37 am Might 'Create Date' and 'Date/Time Original' ever return different values?
You just confirmed that. ) I think a difference created by image digitizing can be neglected. In my cameras all three concerned tags are the same. Anyway the createdate can be absent, depending on your camera, and if you plan to batch rename files based on this tags, you need to check if a file contains this information with 'exiftool -createdate filename' , and, if it is absent, use DateTimeOriginal tag.
Here is data from my random file

Code: Select all

exiftool -AllDates DSCF1372.JPG
An output:

Code: Select all

======== DSCF1372.JPG
Date/Time Original              : 2010:06:06 08:15:37
Create Date                     : 2010:06:06 08:15:37
Modify Date                     : 2010:06:06 08:15:37
gthumb info (or Pix):
exif 2021-05-10 11-32-45.png
exif 2021-05-10 11-32-45.png (8.47 KiB) Viewed 212 times
-=t42=-
Martin1001
Level 4
Level 4
Posts: 406
Joined: Sat Mar 28, 2020 7:19 am
Location: Plymouth, UK

Re: exiftool and Date/Time Original

Post by Martin1001 »

t42, in my case, since I often crop images, Modify Date can be different, but, apart from occasional lack of data for Date/Time Original ( : : : : ), that and Create Date are the same. Many thanks for your help.
Linux Mint 21.2 Cinnamon. 15.6 GiB. 1001.3 GB. Lenovo Thinkpad.
Locked

Return to “Beginner Questions”