Created
February 5, 2024 21:45
-
-
Save emmadesilva/77d821b328cd022b3bc60607e3ffecbb to your computer and use it in GitHub Desktop.
Renames images in the directory to their MD5 checksums
This file contains hidden or 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
| for file in *.jpg *.jpeg *.png *.gif *.webp; do | |
| mv "$file" "$(md5sum "$file" | cut -d ' ' -f 1).${file##*.}" | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment