Error when unzipping a file with extension .gz


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Error when unzipping a file with extension .gz
# 22  
Old 11-25-2013
ASCII mode is what your FTP client calls text mode. This is not a huge leap -- especially when I've been harping about how ASCII only works for text, for pages now.

This is the fourth and last time I will repeat, set your FTP client to binary mode.

Last edited by Corona688; 11-25-2013 at 01:27 PM..
This User Gave Thanks to Corona688 For This Post:
# 23  
Old 11-26-2013
Changing the transfer mode to Binary before doing the file transfer using winscp worked for the .gz file. Do I have to keep changing the transfer mode every time I transfer different kinds of files? I work with .CSV, .TXT, .DAT etc etc.
This User Gave Thanks to dhruuv369 For This Post:
# 24  
Old 11-26-2013
You can transfer anything in binary mode, but text won't be translated for you. The difference between Windows and UNIX text is small but important -- Windows uses \r\n to end lines, UNIX uses only \n. This may confuse some things but not others.

If you have the dos2unix command, you can use it to translate a file afterwards instead of transferring in text mode. You can also do tr -d '\r' < windowstext > unixtext

Last edited by Corona688; 11-26-2013 at 11:37 AM..
# 25  
Old 11-26-2013
Okay, got it...
I do have dos2unix and will use this.
thanks...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unzipping .Z file in UNIX

Hi , How can I unzip a .Z file in Unix? Thanks and regards, Anupam (3 Replies)
Discussion started by: Anupam_Halder
3 Replies

2. Shell Programming and Scripting

Error while Unzipping

Hi, I have transfered a Zip file from Windows to Unix and tried to Unzip it in Unix using ksh. But it throws an error: error : missing 24 bytes in zipfile (attempting to process anyway) error : attempt to seek before beginning of zipfile (please check that you have transferred or... (2 Replies)
Discussion started by: angie1234
2 Replies

3. Shell Programming and Scripting

Unzipping the file

I have my folder structure like a file a.zip is placed in one folder. Inside a.zip is two other zip files x.zip and y.zip If i unzip x.zip i have folder a folder z and inside folder z there are different folders with event time appended to it. Inside the every event folder ,I have a sub folder... (1 Reply)
Discussion started by: weknowd
1 Replies

4. Linux

unzipping file > 2gb

I am not able to unzip file greater then 2gb, Any suggestions how to do that in linux? Regards, Manoj (5 Replies)
Discussion started by: manoj.solaris
5 Replies

5. Shell Programming and Scripting

Unzipping latest zip file by name.

I have these zip files that come in with the same name, but different versions. We'll say: SQL_version2.zip SQL_version3.zip SQL_version2432.zip I was wondering if there is a single command (or even piped command, thus still making it a single command) that will let me unzip the latest... (3 Replies)
Discussion started by: mrwatkin
3 Replies

6. Solaris

Alter zip file without unzipping

I have some zip files. Every file has a "folder/xml file" inside it. Is there any way to change these zip files directly without unzipping them. I want to convert these zip files to "/xml file" (want to move the xml file/s one root up by removing the folder inside it.) Ex: -bash-3.00$ for file... (1 Reply)
Discussion started by: _prasad
1 Replies

7. HP-UX

Error while UNZIPPING

Hi, I have file.zip in windows machine, i moved that .zip to unix throught ftp. when i tried to unzip the .zip file getting the error. please see the below information for the same. I am using the below command to UNZIP : unzip /users/test/file.zip /users/test/test111 Below are the... (1 Reply)
Discussion started by: srujana
1 Replies

8. UNIX for Dummies Questions & Answers

reading a zipped file without unzipping it?

Dear all, I would like to ask how i can read a zipped file (file.gz) without actually unzipping it? i think there is a way to do so but i can't remember it.. can anyone help? thanks in advance.. (1 Reply)
Discussion started by: marwan
1 Replies

9. Shell Programming and Scripting

How to search a pattern inside a zipped file ie (.gz file) with out unzipping it

How to search a pattern inside a zipped file ie (.gz file) with out unzipping it? using grep command.. Bit urgent.. pls..help me (2 Replies)
Discussion started by: senraj01
2 Replies

10. UNIX for Dummies Questions & Answers

unzipping .zip file on HP and Solaris

I am transferring a large .zip file (20 GB) from an NT server to HP-UX and Solaris servers. Originally I tried to use info-zip's unzip, but I found out pretty quickly that it does not support files over 4GB. Any suggestions on how to work around this problem? Different decompression utility?... (9 Replies)
Discussion started by: dangral
9 Replies
Login or Register to Ask a Question