Linux

General discussion

Locked

unzip a text file in unix

By bakshikishore ·
I have a text file gzipped in unix. i have ftped the file to windows (in text mode and not in binary mode). now i am unable to unzip the file back in unix

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

unzip a text file in unix

by bakshikishore In reply to unzip a text file in unix

i do not have the original text file so i wouldn't be able to redo anything

Collapse -

unzip a text file in unix

by bowieb In reply to unzip a text file in unix

If I understand you properly, this is what happened.

1) You gziped a text file in unix.
- This file should be fine
2) You ftped it to windows in text mode.
- As of now, this file is useless.

So...If you have the original text file, or the original gzipped file on unix, you can recover from there. If you don't have either of those, you're out of luck. Once you transferred the gzipped file in text mode, you corrupted it and will be unable to read it anywhere.

Collapse -

unzip a text file in unix

by bakshikishore In reply to unzip a text file in unix

I know i am out of luck but still looking for a solution if someone can provide one

Collapse -

unzip a text file in unix

by johan In reply to unzip a text file in unix

You might correct this problem by transferring it back to unix with ftp in textmode. Hopefully the translation of <LF> to <CR><LF> will be undone. If there were any <CR><LF> in the original zipped unix file, this will not work.
So send it back to Unix with ftp in textmode and try to unzip it with the unix gzip. If this works transfer it back to windows using binary mode. The Winzip program or any other zipper will be able to unzip it for you.

Collapse -

unzip a text file in unix

by bakshikishore In reply to unzip a text file in unix

Have tried this out also but doesnt work

Collapse -

unzip a text file in unix

by Jay Allen In reply to unzip a text file in unix

Well...You might be out of luck. Let summize the situation. You gzipped a file on Unix and ftp via ascii to Windows. Winzip didn't like the file so you ftp back to Unix. I am assuming the same directory therefore over the same file. Now as said early, ascii in good for 'pure text' files. Once the file is gzipped then it is not 'pure'. Therefore the ftp utility corrupted the file and then ftped it back copying over the original file which is now corrupt. So...If this is the case then you are just out of luck. I too have done the exact same thing.

Collapse -

unzip a text file in unix

by bakshikishore In reply to unzip a text file in unix

Yes i realise i am out of luck

Collapse -

unzip a text file in unix

by Gazz In reply to unzip a text file in unix

Did the Windows box change the look of the file and extension?
If the file in unix was myfile.gz
Opened in windows looked like MYFILE.GZ
Brought back to unix MYFILE.GZ or myfile.GZ or myfile.gz.ZIP
You might have to rename the file back to myfile.gz to unzip it.

Good luck????..

Collapse -

unzip a text file in unix

by bakshikishore In reply to unzip a text file in unix

The question was auto-closed by TechRepublic

Collapse -

unzip a text file in unix

by oliviu In reply to unzip a text file in unix

Use ftp in binary mode when you transfer the gzipped file.
I suppose you need to uncompress the file in windows (why did you ftp it?).
For windows use the same utilities (gzip and gunzip). I have them and I can send them to you if this is the case.

Related Discussions

Related Forums