Home Messages Index
[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index

Re: Case Sensitivity in Linux Server

  • Subject: Re: Case Sensitivity in Linux Server
  • From: Mitja <nun@example.com>
  • Date: Wed, 23 Mar 2005 18:13:56 +0100
  • Newsgroups: alt.html
  • Organization: Slovenija OnLine - SiOL
  • References: <d1qt5p$261d$1@godfrey.mcc.ac.uk> <pan.2005.03.23.08.27.37.677730@tobyinkster.co.uk> <d1s38d$epd$1@godfrey.mcc.ac.uk>
  • User-agent: Opera M2(BETA1)/8.00 (Win32, build 7401)
  • Xref: news.mcc.ac.uk alt.html:283723
On Wed, 23 Mar 2005 15:50:36 +0000, Roy Schestowitz <newsgroups@schestowitz.com> wrote:

Toby Inkster wrote:
Roy Schestowitz wrote:
Assuming an Apache server, try mod_speling (sic).
CheckSpelling directive needs to be changed -- something which I cannot do myself. Perhaps I am missing something...
nope, that's ok. Toby assumed you had sufficient privileges to do it.

Is there a script that renames all directories and files to pure lowercase and then changes all links in the files appropriately?

That's pretty basic so I doubt there's a script for it. To rename the files to lowercase (in bash):
for $fn in `find -name '*.html' | sort -r`; do mv $fn `echo $fn | tr [:upper:] [:lower:]`; done


I sort the files in reverse order before processing here so ./Foo/Bar gets renamed before the folder Foo becomes foo and ./Foo/Bar starts pointing nowhere.

To do the magic inside the files:
perl -p -i -e 's/(href=".*?")/\L$1/' `find -name '*.html'`

Disclaimer: tested VERY briefly, but should work.
Feel free to ask if you need any modifications/explanations.

Mitja

[Date Prev][Date Next][Thread Prev][Thread Next]
Author IndexDate IndexThread Index