| « libc6 upgrade error on Debian | Installing Solaris 10 on Dell PE1950 and creating a DNS zone » |
Rename files from upper case filename to lower case (in bash)
This is not really a fresh new post, more just a reminder ;-)
Here is a way to rename files in bash, from upper case filenames to lowercase ones
for i in *; do mv $i `echo $i | tr [:upper:] [:lower:]`; done
5 comments
Comment from: Sebastian Wieseler [Visitor] · http://shortblog.kickino.org/
Are you missing a ´? And you should replace it with $() -- so it should become $(echo $i | tr [:upper:])
But at least this doens't work out for me. :-(
As you can see it here:
$ echo "kickino" | tr -s [:lower:] [:upper:]
KICKINO
You had to specify both sets to convert it, I think.
Have a great day.
But at least this doens't work out for me. :-(
As you can see it here:
$ echo "kickino" | tr -s [:lower:] [:upper:]
KICKINO
You had to specify both sets to convert it, I think.
Have a great day.
02/29/08 @ 16:19
Yep, I may have miss the () as my file names were pretty simple...
02/29/08 @ 17:17
Two more ways from my side
$ ls | while read file
> do
> mv $file `echo $file|awk '{$1=tolower($1);print}'`
> done
$ ls | while read file
> do
> mv $file `echo $file | sed 's/.*/\L&/'`
> done
//Jadu
http://unstableme.blogspot.com/ (BASH blog)
$ ls | while read file
> do
> mv $file `echo $file|awk '{$1=tolower($1);print}'`
> done
$ ls | while read file
> do
> mv $file `echo $file | sed 's/.*/\L&/'`
> done
//Jadu
http://unstableme.blogspot.com/ (BASH blog)
03/16/08 @ 19:14
Comment from: dummy [Visitor]
try this:
http://sourceforge.net/projects/oobash/
especially if you use german umlauts
http://sourceforge.net/projects/oobash/
especially if you use german umlauts
08/18/10 @ 23:55