Jira Courses, Training and Consulting: Sparxsys Trainings
Thanks for coming here, I hope you are enjoying learning here, I have also written some books in case you want to learn a bit more :)
If you need my help with Drupal, Linux, Jira, Scripting, Automation or want to contact me then raise a ticket for me please :) and I will get back to you, promise. At Sparxsys we provide Atlassian consultancy services, reach out to me at ravi at sparxsys dot com

Shell script to organize images by date

I have been clicking pictures in digital format since 2004 when I bought mobile phone with camera. It has been 13 years and I have lot of pictures. I used to manually organize the pictures by create a folder like YYYY-MM-DD_SOME_TEXT and for some reason I really like this format. These days people use Google Photos which is definitely amazing by I am still following the old fashioned way to manage the pics manually.

Most of the pictures I have taken in the past 13+ years are from mobile and stored in the memory card from from time to time I take them from mobile and store them separately by creating a folder by date. I feel lazy to create the folder by date manually and I used this nice shell script to create the folders with date name and nice organize all the pictures take on that date in that folder.

  1. for x in *.jpg; do
  2.   d=$(date -r "$x" +%Y-%m-%d)
  3.   mkdir -p "$d"
  4.   mv -- "$x" "$d/"
  5. done

If you are like me who likes to organize the pictures or in fact any file in this way, you can use the above shell script and even modify it to suit your requirements.

Have fun :)

Similar posts

Subscribe

* indicates required

Please confirm that you would like to from Sparxsys:

You can unsubscribe at any time by clicking the link in the footer of our emails. For information about our privacy practices, please visit our website.

We use Mailchimp as our marketing platform. By clicking below to subscribe, you acknowledge that your information will be transferred to Mailchimp for processing. Learn more about Mailchimp's privacy practices.

Want to contact me?