Reading EXIF without opening a GUI
I came back from a trip with four thousand files across two cameras and a phone,
all with different clock settings and no useful filenames. Opening them in anything
with a preview pane would have taken a week. exiftool took an evening.
Look before you touch
exiftool -s -G -DateTimeOriginal -Model -LensModel IMG_0431.jpg
-s gives the short tag names you would actually type,
-G shows which group each tag came from. Worth doing on one file before
running anything across the whole directory.
Fixing a wrong clock
One camera was two hours and eleven minutes behind for the entire trip:
exiftool -AllDates+=0:0:0 2:11:0 -overwrite_original DIR/
The date shift syntax is Y:M:D h:m:s, and yes, it takes the sign on
the operator rather than the value. Test on a copy first — exiftool is
happy to apply the shift twice if you run it twice.
Filenames that sort themselves
exiftool '-FileName<DateTimeOriginal' -d '%Y%m%d-%H%M%S%%-c.%%e' DIR/
%%-c appends a counter only when two files collide, which happens more
than you would think with burst mode. %%e keeps the original extension.
After this, plain alphabetical order is chronological order, and every tool on the
machine agrees about it.
Stripping before publishing
The GPS tags are the ones that matter. This clears the lot and keeps orientation, so the picture does not end up sideways:
exiftool -all= -tagsFromFile @ -Orientation -overwrite_original out/
The check I do afterwards
exiftool -q -p '$FileName $DateTimeOriginal' -r DIR/ | sort -k2 | head
If the first line is not roughly when the trip started, something is off, and it is much cheaper to find out now than in two years when the archive is the only copy.