LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-16-2004, 11:16 PM   #1
Iain Wilson
LQ Newbie
 
Registered: Sep 2003
Location: MK, UK
Distribution: Mandrake
Posts: 13

Rep: Reputation: 0
Case


Hi all,

Is there anyway of automatically changing the case of file names? I've got a whole bunch of files and I need to convert their file names to lower case. Is their any quick way of doing this?

Many thanks,
 
Old 03-16-2004, 11:51 PM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
There are probably simpler ways of doing this but this line should do the job:
Code:
for foo in *; do mv $foo $(echo $foo | tr [:upper:] [:lower:]); done
hint: put all the files you wish to convert in one directory
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting sLoPPy cASE to Pretty Case with tr lowpro2k3 Programming 4 04-13-2005 08:13 PM
Why are all my upper case files being shown as lower case?? [Kernel 2.6.9-1.667 FC3] t3gah Fedora 4 03-11-2005 04:09 PM
Lower case to upper case letter sudhasmyle Programming 1 12-03-2004 04:15 AM
Looking for plain case for new PC- help krfan1 General 11 06-17-2004 11:52 AM
Case Tool kwigibo Linux - Software 1 08-27-2002 07:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration