If you need to rename all folders and files to lowercase on a case-sensitive filesystem (e.g. ext4 on linux), you can use the following at the bash prompt:
If rename is available (if you have Perl installed, then it usually is):
find . -depth -exec rename 's/(.*)\/([^\/]*)/$1\/\L$2/' {} \;
If you can't use rename, try this:
for SRC in `find my_root_dir -depth` do DST=`dirname "${SRC}"`/`basename "${SRC}" | tr '[A-Z]' '[a-z]'` if [ "${SRC}" != "${DST}" ] then [ ! -e "${DST}" ] && mv -T "${SRC}" "${DST}" || echo "${SRC} was not renamed" fi done
« ‹ | December 2024 | › » | ||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |