Created
March 31, 2016 13:28
-
-
Save u8sand/65c6c891c51b88396681e7399d30d3f3 to your computer and use it in GitHub Desktop.
Rename files to lowercase
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
#!/bin/bash | |
# e.g find . -type f -exec bash rn.sh {} \; | |
p=$(dirname "$1") | |
f=$(basename "$1") | |
l=${f,,} | |
mv "$p/$f" "$p/$l.tmp" | |
sync | |
mv "$p/$l.tmp" "$p/$l" | |
sync | |
echo "$p/$l" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment