#!/bin/bash # get images from connected camera or android device with sshHelper running. # # remove duplicates: # find Bilder/2015 -mindepth 1 -type d | while read dir; do echo; echo $dir; fdupes -drN $dir; done set -x PICS=$HOME/Bilder cd $PICS/new || exit gphoto2 --get-all-files #if [ $USER = max ]; then # rsync -av --remove-source-files max-handy:/storage/sdcard1/DCIM/Camera/ . #else # rsync -av --remove-source-files thomas-handy:/storage/F8D3-5FEF/DCIM/Camera/ . #fi #set -e chmod -R a+rX . if [ ! "$(ls -A .)" ]; then echo "No pictures" exit 0 fi #NCPUS=$(cat /proc/cpuinfo | grep -E $'^processor\t:' | wc -l) #removed: if you have several images per second, order gets disorded # if you use several CPUs. # Sort by ctime to preserve order if there are several images per seconds. find -iname '*.jpg' |sort | nice xargs -r -d '\n' exiftran -aip #falls Reihenfolge defekt: image-rename.py dest="../%Y/%Y-%m/%Y-%m-%d/%Y%m%d_%H%M%S-%.c.%%e" find -type f | sort | xargs -r -d '\n' exiftool '-FileName