Created
December 24, 2018 14:33
-
-
Save caramelchocolate/49cd5930d8894ceabb76ef7fdf3595c8 to your computer and use it in GitHub Desktop.
This one-liner program renames files to md5 hash of any string.
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 ./ -type f -print0 | while read -r -d '' file; do d=$(dirname "${file}"); mv -iv "${file}" "${d}/$(md5 -q ${file}).${file##*.}"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment