[Novalug] how to change file names for CAPITALS to lower case

Angelo Bertolli angelo@freeshell.org
Wed Feb 14 19:22:37 EST 2007


Nino Pereira wrote:
> This topic was discussed once before, but I forgot
> the conclusion. Can anyone remind me of the answer?
>
> I have a directory with lots of files, with file names
> in capitals. I want to change all the file names
> to lower case.

I'll make a guess:

ls | while read file
do
new=`echo $file | tr [:upper:] [:lower:]`
mv -v "$file" "$new"
done


-- 
Angelo Bertolli
Please remove my email address from your post when replying
[Tech http://bitfreedom.com | Gaming http://heroesonly.com]




More information about the Novalug mailing list