Skip to content

Instantly share code, notes, and snippets.

@manchicken
Last active June 3, 2016 15:11
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 manchicken/1e34b3b3470dd96189a2fe286ce2cbfb to your computer and use it in GitHub Desktop.
Save manchicken/1e34b3b3470dd96189a2fe286ce2cbfb to your computer and use it in GitHub Desktop.
Simple command to find all of the images in a large directory tree
find ./public -type f | grep --line-buffered -i -E '\.(jpg|jpeg|bmp|gif|png)' | grep -v dojo
# OR
find -E ./public -type f -iregex '.*\.(jpg|jpeg|bmp|gif|png)' | grep -v dojo
# Compare the results of the two commands using MD5 sums:
find -E ./public -type f -iregex '.*\.(jpg|jpeg|bmp|gif|png)' | grep -v dojo | md5
# 65cc4b9df9eb6f99ecce0b5b1d209ecc
find ./public -type f | grep --line-buffered -i -E '\.(jpg|jpeg|bmp|gif|png)' | grep -v dojo | md5
# 65cc4b9df9eb6f99ecce0b5b1d209ecc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment