Re: Convert file in a dir to lower case



Gin wrote:
"Netlurker" <netwizNO@xxxxxxxxxxxxxxxx> ha scritto nel messaggio
news:13c58$473144a2$d0664623$1217@xxxxxxxxxxx
On Tue, 06 Nov 2007 18:13:31 +0100, Gin wrote:

Hi, how to convert recursively all file in a directory and all subdirs
to lower case ?

Bye
There are several ways to do it but here is something I whipped up real
quick:

for x in `find .`; do new=`echo $x | tr '[A-Z]' '[a-z]'`; mv $x $new; done

Do that from inside the starting directory.

- Netlurker


Thank you Netlurker !

It's possible to make it work recursively on the content of subdirs ?



'find' is recursive. To fix the directory renaming issue, make the find
look more like this 'find . -type f'

JR.

--

Bill will have to take Linux from my cold, dead flippers.

-Tux.
.