Suppose you have folder with an almost infinite number of JPEGs inside and you would like to check if there's some of them which is broken/corrupted. How would you do?

JPEGinfo is the way, I found it easier to use than the identify functions in imagemagick. The nice part of this command is that it also prompt the file name of the broken image.

jpeginfo *.jpg | grep ERROR

As result the bash will display the line containing the error and also the file name of it.