[buug] lowercase coversion of filenames

Claude Rubinson cmsclaud at arches.uga.edu
Wed Aug 28 11:04:49 PDT 2002


On Wed, 28 Aug 2002, Michael Stead wrote:

> translation process on each file. Unfortunately someone named all these
> files with some capital letters embedded in the filenames. Does anyone
> know what the UNIX commmand or procedure would be to remedy this?
> Something like 'tr', but for filenames?

There are about a million ways to do this, including using tr.  The below
shell script should work, althouth I haven't tested it.  

for filename in $(ls|grep [A-Z]; do
	mv $filename $(echo $filename|tr [:upper:] [:lower:])
done

For something more sophisticated you could do a web search for DOS to Unix
filename conversions, since this is a common problem.

c.






More information about the buug mailing list