How do I rename all files and folders to lowercase

Navigate to the folder that you want to operate on. Then execute the following line.

find . -depth |while read LONG; do SHORT=$( basename "$LONG" | tr '[:upper:]' '[:lower:]' ); DIR=$( dirname "$LONG" ); if [ "${LONG}" != "${DIR}/${SHORT}" ]; then mv "${LONG}" "${DIR}/${SHORT}" ; fi; done