Created
July 24, 2013 03:53
-
-
Save wbingli/6067964 to your computer and use it in GitHub Desktop.
Change all file and directory name to lowercase
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
find . -name '*[A-Z]*' -print0 | xargs -0 rename 'y/A-Z/a-z/' |
for i in {1..15}
do
find . -maxdepth $i -name '[A-Z]' -print0 | xargs -0 rename 'y/A-Z/a-z/'
done
Need to convert the files one level by one level, otherwise, the files with folder name changed will fail.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"-maxdepth 1" for only convert first level file and folders