Charlie Harvey

Quick tip: Find all image sizes ImageMagick and find

A super quick tip this. The other day I needded to find images bigger than a given width on the New Internationalist website. The quickest way I could think of to do this was to use find to locate all the files and combine that with ImageMagick’s identify command. And finally to pipe that to sort to make sure the list came out in size order. Then I could scroll down to the cutoff size.

Here is the final command I used. $ find . -iname *jpg -exec identify -format "%w: %f" {} \; | sort -rn Job done.


  • Be respectful. You may want to read the comment guidelines before posting.
  • You can use Markdown syntax to format your comments. You can only use level 5 and 6 headings.
  • You can add class="your language" to code blocks to help highlight.js highlight them correctly.

Privacy note: This form will forward your IP address, user agent and referrer to the Akismet, StopForumSpam and Botscout spam filtering services. I don’t log these details. Those services will. I do log everything you type into the form. Full privacy statement.