Change uppercase to lower in Linux

Just in case you wanna change uppercase to lowercase for all files inside a directory…

#!/bin/sh
for i in *
do
j=`echo $i | tr ‘[A-Z]‘ ‘[a-z]‘`
mv $i $j
done

Make sure you “chmod a+x filename” and then execute this from within the directory…

Advertisements