Collection of notes
N=1; ls -tr -1 *.jpg | tac | while read file; do mv "$file" "$N".jpg; N=$((N+1)); done
mogrify -rotate 180 *.jpg mogrify overwrites existing images which is what makes it different from convert
mogrify -rotate 180 *.jpg
mogrify
convert