yum install perl-Image-ExifTool
There are three common formats for picture metadata:
#!/bin/sh
for RAW_FILE in `ls -1v --color=never *.CR2`; do
JPG_FILE=${RAW_FILE%%.CR2}.JPG
if [[ ! -f JPG/$JPG_FILE ]]; then
echo Extracting preview from $RAW_FILE to $JPG_FILE with EXIF
/usr/bin/exiftool -b -PreviewImage -w JPG/%f.JPG $RAW_FILE
/usr/bin/exiftool -tagsfromfile $RAW_FILE --PreviewImage --ThumbnailImage -overwrite_original_in_place -q JPG/$JPG_FILE
touch -r $RAW_FILE JPG/$JPG_FILE
fi
done
Add 1 hour to all files in MY_PICTURE_FOLDER where date greated than 2/4/2006 source
exiftool -alldates+=1 -if '$CreateDate ge "2006:04:02"' MY_PICTURE_FOLDER
exiftool -all= *.jpg
exiftool -Keywords+=london ./TEST.JPG