Simple EXIF tags cleanup script for Linux
This is a super simple script to clean some of the Exif data from image using exiftool. You can get exiftool from here: http://owl.phy.queensu.ca/~phil/exiftool/
exifclean [-d|-D] FILENAME1 FILENAME2 ...
-d: delete the original copy generated by exiftool with confirmation
-D: force delete of the original copy generated by exiftool
- Download the script (I use /home/user/bin) and add execute permissions.
- Generate excludes file based on image:
- For quick export of all tags and generate your own exclude file you can use:
exiftool -s FILENAME | awk '{ print $1 }' > exifclean_exclude - To see the full list of tags for your image you can use:
exiftool -a -g1 FILENAME
- For quick export of all tags and generate your own exclude file you can use:
- Remove tags you want to keep from the generated file and put that file into script folder.
mv exifclean_eclude /home/user/bin/exifclean_exclude
Copy your original image and run the script on the copy
cp FILENAME test.jpg; exifclean test.jpg; exiftool test.jpg
- I never use this on RAW files, only on the finalized versions exported from my raw editor, I suggest you to do the same.
- exiftool will by default leave a copy of the image with format FILENAME_original,
if you didn't use the delete [-d|-D] flags, you can revert the changes by:
exiftool -restore_original FILENAME