Using mv to change files from uppercase to lowercase?

Entity

Lifer
Oct 11, 1999
10,090
0
0
There is a way to use the mv command to rename all files from upper-case and mixed-case to all lowercase. However, I can't find it right now, and can't remember it for the life of me...anyone wanna help?

Rob
 

Cerebus451

Golden Member
Nov 30, 2000
1,425
0
76
#!/bin/csh -f
set files=`/bin/ls -1`
foreach file ($files)
mv $file `echo $file | tr '[A-Z]' '[a-z]'`
end

That would do it. Not sure if there is a way to get mv to do it automagically.
 

Entity

Lifer
Oct 11, 1999
10,090
0
0
Yeah, there is a way to get mv to do it automatically without needed a script...oh well, I'll just use a script for now. :p

Rob