Skip to content

Instantly share code, notes, and snippets.

@jackbrown
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jackbrown/56f17125b787471a5ef2 to your computer and use it in GitHub Desktop.
Save jackbrown/56f17125b787471a5ef2 to your computer and use it in GitHub Desktop.
Command for counting the number of images in a directory
Get a list of all images in a directory and its child directories
find . -type f -name *.gif -o -name *.jpg -o -name *.bmp -o -name *.jpeg -o -name *.png
Get a count of all images in a directory and its child directories
find . -type f -name *.gif -o -name *.jpg -o -name *.bmp -o -name *.jpeg -o -name *.png | wc -l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment