Skip to content

Instantly share code, notes, and snippets.

@vijinho
Last active August 31, 2018 04:34
Show Gist options
  • Save vijinho/955dffb20a4572b46da236f8f91bc84c to your computer and use it in GitHub Desktop.
Save vijinho/955dffb20a4572b46da236f8f91bc84c to your computer and use it in GitHub Desktop.
jpeg image - add comment (and/or rename based on exif date setting file time if exif exists)
# jpeg image - add comment (and/or rename based on exif date setting file time if exif exists) delete thumb
export JHEAD_FILE_ARGS="%Y-%m-%d-%a-%H%M%S"
export COMMENT="image use allowed only by permission of vijay mahrra <[email protected]> - all rights reserved"
# add comment, auto-rotate, rename files with exif tags, set file date
find . -type f -iname "*.jp*" -exec jhead -cl "${COMMENT}" -exonly -zt -di -dt -ft -autorot -n${JHEAD_FILE_ARGS} {} \;
# add comment, set file date to all files - will skip existing
find . -type f -iname "*.jp*" -exec jhead -cl "${COMMENT}" {} \;
# add comment, regenerate image thumbnail, set file date
# find . -type f -iname "*.jp*" -exec jhead -cl "${COMMENT}" -mkexif -dsft {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment