linuximageubuntumogrify

using mogrify on lot of images gives error


I am using mogrify to resize the images in a directory using the following command

    mogrify -resize 100x100 *.jpg

due to the huge number of images, I get the following error

    /usr/bin/mogrify: Argument list too long

Any suggestions?

Thanks


Solution

  • find or xargs come to mind, eg.

    find . -name \*.jpg -exec mogrify '{}' -resize 100x100 \;
    

    Cheers,