*BSD News Article 83276


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!metro!metro!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!uunet!in2.uu.net!minerva.ibernet.es!diana.ibernet.es!boqueron.vnet.es!frer
From: Francisco Rodrigo <frer@vnet.es>
Newsgroups: comp.infosystems.www.servers.unix,comp.unix.bsd.freebsd.misc,comp.unix.programmer,comp.unix.questions
Subject: Re: Help Need a UTIL for Case Sensitive Files.
Date: Tue, 19 Nov 1996 14:25:03 +0100
Organization: Unisource Espana NEWS SERVER
Lines: 31
Message-ID: <Pine.LNX.3.91.961119142024.2275A-100000@boqueron.vnet.es>
References: <01bbd5d3$54b9d060$86629dcc@big-one>
NNTP-Posting-Host: boqueron.vnet.es
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: <01bbd5d3$54b9d060$86629dcc@big-one> 
Xref: euryale.cc.adfa.oz.au comp.infosystems.www.servers.unix:22135 comp.unix.bsd.freebsd.misc:31299 comp.unix.programmer:46592 comp.unix.questions:91618

Hello.

On 19 Nov 1996, Erotic Delirium wrote:

> does anyone have a utility that will go through and change filenames &
> directories from uppercase to lower case.  I need to change everything in a
> certian directory including subdirs to lowercase and its about 9000 files.

That problem seems too familiar for me...

> (no joke)

Indeed.

> -- 
> Kelly

Just do this:

cd /your/directory
for a in *; do mv $a `echo $a | tr '[:upper:]' '[:lower:]'`; done

This works fine for files. I have never had the need for a recursive 
traversal of a directory tree. Comments are welcome.

Hope you find it useful.

---
Greetings from Francisco Rodrigo - System administrator, Virtual Net
mailto:frer@vnet.es                ax25:  ea7abo@ea7cnm.eama.esp.eu