Bash: Sorting .jpg files into directories based on EXIF time

October 8th, 2013 by Leandro Morgado

I had a bunch of .jpg photos in one directory and wanted to place them into folders by date. Here is how I automated that:

shell> exiftool 20130823_210740.jpg | grep -i date
File Modification Date/Time     : 2013:08:23 21:07:40+01:00
Modify Date                     : 2013:08:23 21:07:40
Date/Time Original              : 2013:08:23 21:07:40
Create Date                     : 2013:08:23 21:07:40
 
shell> for i in $(ls -1 *.jpg); do VAR=$(exiftool $i | grep "Date/Time Original"| cut -d' ' -f16-17 | cut -d':' -f2-4| tr : _ ); echo mkdir -p $VAR; echo mv $i $VAR ; done
mkdir -p 2013_08_23
mv 20130823_210740.jpg 2013_08_23
mkdir -p 2013_08_23
mv 20130823_210744.jpg 2013_08_23
^C
 
shell> for i in $(ls -1 *.jpg); do VAR=$(exiftool $i | grep "Date/Time Original"| cut -d' ' -f16-17 | cut -d':' -f2-4| tr : _ ); mkdir -p $VAR; mv $i $VAR ; done
 
shell> ls
2013_08_23	2013_08_31	2013_09_06	2013_09_11	2013_09_15	2013_09_22	2013_10_05
2013_08_26	2013_09_01	2013_09_08	2013_09_12	2013_09_20	2013_09_26	2013_10_06
2013_08_30	2013_09_03	2013_09_09	2013_09_13	2013_09_21	2013_09_27

Clark Little’s amazing wave photography

July 5th, 2009 by Leandro Morgado

I came across some photos that simply left me stunned. After seeing these photos I searched for who the author was and found that they were taken in Hawaii by Clark Little. Below are the samples I received. I encourage you to check out the author’s website for more stunning art work.