LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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-17-2004, 12:16 AM   #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-17-2004, 12:51 AM   #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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09: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 05:09 PM
Lower case to upper case letter sudhasmyle Programming 1 12-03-2004 05:15 AM
Looking for plain case for new PC- help krfan1 General 11 06-17-2004 12:52 PM
Case Tool kwigibo Linux - Software 1 08-27-2002 08:24 PM


All times are GMT -5. The time now is 09:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration