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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem unzipping a file

Status
Not open for further replies.

unixwhoopie

Programmer
May 6, 2003
45
US
Hello gurus, here is the situation. I am receiving several files from a remote server through an automated process. One of these files is zipped. It initially has a .dat.gz extension.

I know there is 'gunzip' command to unzip and read the files. However, when this file arrives into our server, it looses the .dat.gz extension. All files received have a common format: MFEX**.DateStamp

Since this does not have a .dat.gz extension, I cannot use gunzip or zcat. Is there any other way I can unzip this file?

Thanks in advance.
 
It probably isn't compressed anymore.

Some FTP's will uncompress the files on the fly, and this may well be the case. If it is then you can just use them directly.

See your FTP manual, both server and client.

You also don't say what is the OS, neither the FTP version used (client and server). Please supply us with this info.






Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Frederico

It is still compressed because when I open, it displays strange characters.

Also, this file is coming from I3 (a file transfer mechanism between servers) and not ftp (as you mentioned in your post). Any other ways to unzip the file?

Thanks
 
> It is still compressed because when I open, it displays strange characters.

That's a non sequitur. You could see strange characters in the original file as well. The original file is [tt]something.dat.gz[/tt]. A [tt].dat[/tt] extension often indicates a file containing binary data, which wouldn't be readable in a text editor.


Use the command [tt]file[/tt] to check and see what kind of file it really is. If it really is gzipped and gunzip is just complaining about the file having a wrong extension, just rename it as suggested before.


Also, make sure you transferred the file in binary mode instead of text mode, if such a distinction exists on what you're using.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top