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
# OS X | |
# List affected files | |
find -E . -regex '.*/[-_a-zA-Z0-9]+-[0-9]+x[0-9]+\..+' -print -exec ls '{}' \; | |
# Remove affected files | |
find -E . -regex '.*/[-_a-zA-Z0-9]+-[0-9]+x[0-9]+\..+' -print -exec rm '{}' \; | |
# Downsize all images to 1200px | |
find . -iname "*.jpg" -type f -exec sh -c 'sips -Z 1200 "$0"' {} \; |