PDA

View Full Version : uppercase unix trouble


stefano_ME30
06-04-2003, 11:54 AM
hello all

I have this problem and I'm asking u some help.
We have large numbers of files stored on HP-UX system, due this system is casesensitive we cant load it well.
All these file r on lowercase and it seems I have two way or I will move all these files on uppercase side or I can tell OSDM and OSDD to ignore case. Moving tons of file in uppercase on UNIX OS is not so easy for me, can any helps me with a script for to batch it?
Or in other case there is some internal command for both OSD programs (HP-UX based) that can set them for to ignore case on file names?

I hope it will be clear better of mud and I thank you allot for any help.

Ciao
Stefano

clausb
06-05-2003, 10:38 AM
AFAIK, there is no way to tell OSDM to ignore case on HP-UX; the reason is that OSDM goes through standard operating system calls to locate, open and load files, and those OS calls follow the rules of the filesystem which is used to store the files.

So here's a crazy idea: If you find a filesystem which can be switched into case-insensitive mode, then you might be close to home. For example, maybe you can configure an NFS server into such a mode. (The NFS 4 specs talk about server attributes for case insensitivity although I'm not exactly sure what this means.) Or, better still, use Samba. The article at http://groups.google.com/groups?q=case-insensitive+samba&hl=en&lr=&ie=UTF-8&selm=93kjf1%24682%241%40nnrp1.deja.com&rnum=1 describes how a Linux user solved a very similar problem with the help of Samba.

The idea is roughly like this:

Run a Samba server on your HP-UX machine and export the directory containing the file in case-insensitive mode. Check out http://us1.samba.org/samba/docs/man/smb.conf.5.html#CASESENSITIVE to learn how to configure Samba to ignore case.
Run a Samba client (Sharity-Lite comes to mind, see http://www.obdev.at/products/sharity-light/ ) on the same HP-UX box to mount the exported file system.
Load from that mounted filesystem


BTW, why do you think that changing all the names into uppercase (probably a trivial hack in, say, perl) would fix the loading problems?

Claus

Thom Ivancso
06-05-2003, 01:29 PM
I have a script I wrote that will convert all the file names in a directory to either all uppercase or lowercase, depending on the need.

Usage: chgcase [-l|-U] file ..." THe file name can be a "*" to take all the files in the directory.

Let me know if you need something like this and I will pass it along.



Cheers
Thom

stefano_ME30
06-05-2003, 02:04 PM
great tips Claus I will try it.
We was abit to use file name like AA23456.sda and we need this uppercased AA for our macros and this .sda lowercased for to make OSD Unix based happy.

U can't believe how it would help me Thom.

Send it to stestraniATliberoDOTit (hehe very nice anti spamming form!).

Thx u all.