I have large number of files with .gif extension. I would like to move all animated gifs to another directory. How can I do this using linux shell?
Basically, if identify returns more than one line for a GIF, it's likely animated because it contains more than one image. You may get false positives, however.
Example use in shell:
for i in *.gif; do
if [ `identify "$i" | wc -l` -gt 1 ] ; then
echo move "$i"
else
echo dont move "$i"
fi
done
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With