Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with unzip utility

Status
Not open for further replies.

fisa

Programmer
Nov 28, 2003
19
GB
Hi Friends,

I am facing a problem here with unzip utility installed in my hp-ux box. I created a zip file in windows machine and ftped it on to a hp-ux server. Here when I unzip the file.zip all the directories with capital letter names gets converted to small letter.Please throw some light on this......I need to resolve this urgently.
 
Hey Fisa - I suspect it's not HPUX, but let's find out.

1) Start on Windows and open the ziped file in a hex editor and see how the structure looks. (A test editor would work just a bit messy) Zips store the file name (and path if included) in clear text so they'll be easy to spot.

If filenames are all LC the stop, throw your zip program away and get a new one. If all is well continue....

2) Ftp the file to your HPUX machine (remember binary transfer), now log into the HPUX machine and run a strings on the zip file - strings zipfile.zip | grep -i your_directory_name. What's the case state?

If filenames are all LC the stop, and go hmmmmm. Ftp is messing it up. I highly doubt this will happen. If it does there are 1 or 2 extremely remote possibilities. We'll go there if need be. If all is well continue.....

3) unzip with the -l switch - unzip -l zipfile.zip - look at the file list. Are they all LC?

If so check your stty settings. Just run stty command and look for xcase, lcase, iuclc, or olcuc. If they are there, there's your problem.

If not use a different unzip. I tried 5.50 from Porting Archive on 11i and all worked fine (Winzip on windows BTW).

Let me know if this helps.
STF
 
Windows explorer may add its own capitals. Try using dir from the command-line to see the true letter case.
 
Hi SuperTekFreak,

thanks a lot for the detailed reply. Let me convey my reply.

This is not an FTP issue. In different HP-UX boxes this behaves differently. So either it is a problem with the version of unzip utilty or with some system settings.unzip 5.1 version is giving a problem whereas unzip 5.4 is working fine. That is in unzip 5.1 all the directory names (lowercase and upper case) are unzipped into lower case where as in unzip 5.4 lower case are unzipped into lowercase and upper case into upper case as desired. As i can't upgrade the unzip version immediately in my box, i found that unzip -U file.zip unzips the file as desired.(ie, lower case in lower case and upper case inn upper case).

so i think i will go for the option unzip -Uo file.zip . but i read some where that -U option will be deprecated soon with the future releases. Is there any other undesired effect if i use -U option?

What do u all say?
 
That's an option.

Or you could just use GNU zip(gzip/gunzip), which is already on UNIX and works across all of them consistantly. There is a version for windows as well.

Just a thought. Search Google for gzip windows.

STF
 
Try using jar if this is installed and see what happens.

I love deadlines. I like the whooshing sound they make as they fly by - Douglas Adams
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top