Last active
June 3, 2016 15:11
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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