Rename and autorotate images using jhead
jhead -autorot -nf%y%m%d-%H%M%S *.jpg
Options:
-n[<fmt-string>] This option causes files to be renamed and/or moved according to the Exif header "DateTimeOriginal" field. If the file is not an Exif file, or the DateTimeOriginal does not contain a valid value, the file date is used.
A sequence number may also be included by including '%i' in the format string. Leading zeros can be specified. '%03i' for example will pad the numbers to '001', '002'... this works just like printf in C, but with '%i' instead of '%d'. %d Day of month as decimal number (01 – 31)%HHour in 24-hour format (00 – 23)%jDay of year as decimal number (001 – 366)%mMonth as decimal number (01 – 12)%MMinute as decimal number (00 – 59)%SSecond as decimal number (00 – 59)%UWeek of year as decimal number, with Sunday as first day of week (00 – 53)%wWeekday as decimal number (0 – 6; Sunday is 0)%yYear without century, as decimal number (00 – 99)%YYear with century, as decimal number