Last active
November 17, 2015 12:35
-
-
Save denitram/40a0d39917b1886999c8 to your computer and use it in GitHub Desktop.
rename files 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
* quick and dirty | |
for i in `ls` ; do mv "$i" "$(echo $i | tr A-Z a-z)"; done | |
* beter version | |
for i in $(find . -type f -name "*[A-Z]*"); do mv "$i" "$(echo $i | tr A-Z a-z)"; done | |
-name "*[A-Z]*" ensures that only files with capital letters are found. For example, if files with only lowercase letters are found and moved to the same file, mv will display the are the same file error. | |
Thanks to Steve see: http://stackoverflow.com/questions/13051871/change-filenames-to-lowercase-in-ubuntu-in-all-subdirectories |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment