*BSD News Article 83275


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!news.dra.com!news.good.net!news.good.net!news.goodnet.com!goodguy!cdi
From: Cal Dunigan <cdi@goodnet.com>
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 21:21:26 -0700
Organization: GoodNet
Lines: 22
Message-ID: <Pine.GSO.3.95.961119211603.5049F-100000@goodguy>
References: <01bbd5d3$54b9d060$86629dcc@big-one>
NNTP-Posting-Host: goodnet.com
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sender: cdi@goodguy
In-Reply-To: <01bbd5d3$54b9d060$86629dcc@big-one>
Xref: euryale.cc.adfa.oz.au comp.infosystems.www.servers.unix:22128 comp.unix.bsd.freebsd.misc:31286 comp.unix.programmer:46583 comp.unix.questions:91602

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.

You can use either sed or tr in a set of nested for loops. The
magic is setting up the for loops to avoid overlong argument lists.
Try setting the outer loop to do only the files in the parent
directory and create inner loops for all the subdirectories. You may
need to break down the list of filenames into smaller groups based on
the first character of the filename.

If this is too general, send me an email and I will give you a
skeleton.

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    Cal Dunigan                       My opinions *ARE* the company's
    cal@ccdi.com                      opinions.
    Consulting, Modeling, Training
//////////////////////////////////////////////////////////////////////