Thursday, January 28, 2016

Convert many images with imagemagick

ls -1 *.png | xargs -n 1 bash -c 'convert "$0" "${0%.*}.jpg"'
 
find . -name \*.jpg | xargs -n 1 bash -c 'convert "$0" "${0%.*}.png"' 
 

Copy files from another directory when "argument list too long"

find ../COCO/images/train2014/ -name '*.jpg' -exec cp -pr {} . \;