Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing uppercase to lowercase filenames

Status
Not open for further replies.

impulse24

IS-IT--Management
Jul 13, 2001
167
US
Hi All,

I have tons of files that are named with uppercase, and I would like to convert to lowercase. What is the easiest way to do this? Thought maybe with sed, but was hoping there's an easier way.
 
You could use tr to translate the name in a script.

for infile=`ls`
do
newname=`echo $infile | tr "[:upper:]" "[:lower:]"`
mv $infile $newname
done


Hope this helps.


John


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top