Sponsored Content
Top Forums Shell Programming and Scripting Error when unzipping a file with extension .gz Post 302876101 by Corona688 on Thursday 21st of November 2013 05:12:02 PM
Old 11-21-2013
Again, I suspect the file was transferred in ASCII mode which corrupted it. This is a common pitfall with FTP. You would never notice this problem transferring raw text, but it will scramble anything else!

The file command only checks the first few bytes of the file to make a reasonable guess at what kind it is. Most binary files begin with a type code, header, or something. It wouldn't notice any corruption that happened later.

Last edited by Corona688; 11-21-2013 at 06:19 PM..
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
ftpconversions(4)						   File Formats 						 ftpconversions(4)

NAME
ftpconversions - FTP Server conversions database SYNOPSIS
/etc/ftpd/ftpconversions DESCRIPTION
When the FTP Server, in.ftpd(1M), receives the retrieve (RETR) command, if the specified file does not exist, it looks for a conversion to change an existing file or directory of the same base name into the format requested, subject to the ftpaccess(4) compress and tar capabil- ities. The conversions and their attributes known by in.ftpd(1M) are stored in an ASCII file of the following format. Each line in the file pro- vides a description for a single conversion. The fields in this file are separated by colons (:). %s:%s:%s:%s:%s:%s:%s:%s 1 2 3 4 5 6 7 8 The fields are described as follows: 1 Strip prefix. 2 Strip postfix. 3 Addon prefix. 4 Addon postfix. 5 External command. 6 Types. 7 Options. 8 Description. The Strip prefix and Addon prefix fields are not currently supported. The Strip postfix and addon postfix fields are extensions to be added to or removed from the requested filename in attempting to produce the name of an existing file or directory. When the attempt succeeds, the FTP Server runs the external command associated with the conver- sion. The magic cookie %s in the argument is passed to the command, replaced with the name of the existing file or directory. External command is the absolute pathname of a command to run followed by the appropriate options to carry out the conversion. The standard output of the command is sent back in response to the RETR (retrieve) command. For anonymous and guest users to be able to execute the com- mand, it must be present in their chroot'd hierarchy along with any necessary dynamic libraries. Types specifies the conversion type. The following values are recognized: T_ASCII ASCII transfers are allowed of a file produced by the conversion. T_DIR Directories can be converted. T_REG Regular files can be converted. Options are checked against the ftpaccess(4) compress and tar capabilities and are recorded in the special-action-flag field that is writ- ten to the FTP Server logfile. See xferlog(4). The following options are supported: O_COMPRESS conversion compresses O_TAR conversion archives O_UNCOMPRESS conversion uncompresses You can specify more than one option by using "|" to separate options. For example, O_TAR|O_COMPRESS specifies that the conversion archives and compresses. Description is a one word description of the conversion that is used in error messages returned to the FTP client. Lines that begin with a # sign are treated as comment lines and are ignored. EXAMPLES
Example 1: Compressing a Regular File for Transfer The following example specifies a conversion which generates filename.Z by compressing an existing file filename. The conversion can only be applied to regular files, not directories, and the absence of T_ASCII prevents the resulting file from being transferred in ASCII mode. : : :.Z:/usr/bin/compress -c %s:T_REG:O_COMPRESS:COMPRESS Example 2: Uncompressing and Transferring in ASCII Mode The following example specifies a conversion that takes filename.Z and uncompresses it to produce filename, which then can be transferred in ASCII mode. :.Z: : :/usr/bin/compress -cd %s:T_REG|T_ASCII:O_UNCOMPRESS:UNCOMPRESS FILES
/etc/ftpd/ftpconversions ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWftpr | +-----------------------------+-----------------------------+ SEE ALSO
ldd(1), in.ftpd(1M), ftpaccess(4), xferlog(4), attributes(5) SunOS 5.10 1 May 2003 ftpconversions(4)
All times are GMT -4. The time now is 03:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy