my ideas in action

change the date of the JPG photos with EXIF date

Sometimes it happens that you get various photos , from a vacation, for example, that are not in the good order. The name of the file or the date of the file is wrong. This makes that, when you try to browse the pictures, some of them are not in correct chronological order.

To fix that I found really useful to use a combination of a jhead command and a self-made bash script.

Steps to do:

  1. make a backup of the photos
  2. install jheads and use it to copy the date from EXIF info to the date of the file
    1. install jhead
    2. run from terminal
    3. jhead -ft *.jpg

  3. make a script like this and run it
    1. make a script as ASCI text with nano and then chmod 755 rename_by_date.script
    2. content of the script:
      1. #!/bin/bash

        echo “rename of files based on the date:”

        ls -tr | while read i; do n=$((n+1)); mv — “$i” “$(printf ‘NewName_%04d.jpg’ “$n”)”;



That it is all.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: