Created
February 1, 2020 10:18
-
-
Save neklaf/704c7cf6336243ce543f31cf1c99be48 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/sh | |
if [ -z "$1" ] ; | |
then | |
printf "Specify a directory name.\n" | |
exit 1 | |
fi | |
sudo apt update && apt install rename | |
find $1 -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \; | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment