Unable to gunzip .tgz file in AIX6.1


 
Thread Tools Search this Thread
Operating Systems AIX Unable to gunzip .tgz file in AIX6.1
# 1  
Old 08-31-2010
Unable to gunzip .tgz file in AIX6.1

Hi guys,

This is my 1st post here. I tried to Google around but failed to get my solution. So I hope you guys could help me. (I have just a basic unix background for 2years so I'm sorry if im asking stupid questions)

OS
- Aix 6.1, 64 bits.
Server - currently I only have telnet access to a Aix machine. ( I don't have SSH access)
The problem - I can't seem to extract or gunzip a .tgz file.

Error 1 ->
# gunzip install.tgz

gunzip: install.tgz: invalid compressed data--crc error

gunzip: install.tgz: invalid compressed data--length error


Error 2 -:>
I also tried to extract an apache file for aix.

# tar -xvf apache-2.2.14_openssl-0.9.8k_modjk-1.2.26_aix53.tar.gz
tar: 0511-169 A directory checksum error on media; 0 not equal to 63252.

Investigations(might help to identify the problem) -


1) Some say its because when I ftp it may transfer as an ACSII file. So i tried typing binary when I ftp to the AIX machine. It showed type set to I. So I just ftp the .tgz file that I want to my AIX machine. So when I tried to gunzip, same thing happened.

my method of transferring file -> I used WinSCP to download the file from a server to my local machine > then from my local machine I ftp to the remote aix machine.

2) gunzip installed in AIX? i tried the gunzip -V
# gunzip -V
gunzip 1.2.4 (18 Aug 93)
Compilation options:
DIRENT UTIME STDC_HEADERS HAVE_UNISTD_H


but on another machine the with the same version, I could successfully gunzip it.

3) is it because the .gzip was compiled in non aix? but the installer.tgz (the file that im trying to unzip) initially supports all OS. I tried in RHEL was fine, in windows2k8 was fine also.

4) I tried checking the file size with the one i transferred to other servers, and it is the same. (FTP takes so long)

Any ideas? please advice? would it be like a binary or library missing? Any suggestions?

cheers
pilotHans
# 2  
Old 08-31-2010
Perhaps this is a Linux file

I have looked at the AIX 6.1 tar command and it appears that the .tgz format is not supported. The Linux tar command has a flag (-z lower case) which is not supported by AIX. The entry from the Linux site is as follows:

To uncompress bob.tgz, tar zxvf bob.tgz - If a folder was compressed originally, then the original folder will be created. If not, then the files will be placed in the current directory.

I hope this helps.
# 3  
Old 08-31-2010
Quote:
Originally Posted by johnf
I have looked at the AIX 6.1 tar command and it appears that the .tgz format is not supported. The Linux tar command has a flag (-z lower case) which is not supported by AIX. The entry from the Linux site is as follows:

To uncompress bob.tgz, tar zxvf bob.tgz - If a folder was compressed originally, then the original folder will be created. If not, then the files will be placed in the current directory.

I hope this helps.
Thanks for the quick response!

1) okay, your saying that I have to find another installer that had been compressed in an AIX environment ant not in a .tgz format?

2) the weird thing is, I tried gunzip installer.tgz in another machine which is also AIX and it works. However when I try to > copy it to my local machine - success > ftp to my aix machine, it failed

+ btw, the method that I'm telnet to the AIX6.1 machine (64) is via putty.
# 4  
Old 08-31-2010
did you use the binary mode to copy the files over ftp?

use cksum command on both aix machines, if the value is different you screwed it up with ftp
# 5  
Old 08-31-2010
Quote:
Originally Posted by pilotHans
Code:
# tar -xvf apache-2.2.14_openssl-0.9.8k_modjk-1.2.26_aix53.tar.gz

This won't work, because tar can only work on tar-files, not on gz-files. A ".tar.gz" file is a file in tar-format, which was packed into a ".gz."-file. (Think of it like a package wrapped into another package.) To unpack it, you have to unwrap one level after the other:

Code:
gzip -cd <file.tar.gz> | tar -xf -

gzip is asked to decompress (unpack) the file ("-d") and to send the result to <stdout> ("-c"), into a pipeline. At the end of the pipeline tar receives this file ("-f -") from <stdin> and further unpacks it ("-x").

Quote:
Originally Posted by pilotHans
my method of transferring file -> I used WinSCP to download the file from a server to my local machine > then from my local machine I ftp to the remote aix machine.
There are two possible places where something might have gone wrong: when you transferred the file to your local system from the internet and when you transferred it from there with ftp. You made sure the second step is correct by using "bin" inside ftp, but maybe this error occurred in the first step. Download again from the internet and make sure you use "binary" there too when you do so.

Quote:
Originally Posted by pilotHans
3) is it because the .gzip was compiled in non aix?
You should be able to unpack the files correctly, even if you cannot run the unpacked executable. The tar-format and the gzip-format are both universal and the file(s) should unpack without problems. To *run* the resulting files is a different matter, of course. You will need *binaries* for your system, even if some shell-scripts(?) for installation purposes might be able to run on your architecture.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
# 6  
Old 08-31-2010
extract the tar archive in Linux or windows Box and copy it to AIX :-) very simple
# 7  
Old 09-01-2010
Thanks guys for replying.

Quote:
Originally Posted by funksen
did you use the binary mode to copy the files over ftp?

use cksum command on both aix machines, if the value is different you screwed it up with ftp
okay,

Code:
from my aix6.1
# cksum install.tgz
2945023227 28246184 install.tgz

from my server where i took the file
% cksum install.tgz
229238057 28246615 install.tgz

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Unable to extract .gz file using gunzip

Linux 3.8.13-16.2.1.el6uek.x86_64 #1 SMP Thu Nov 7 17:01:44 PST 2013 x86_64 x86_64 x86_64 GNU/Linux Hi all, I am unable to extract .gz file using gunzip Used the following command to create the .gz file: nohup tar -cvpf - 11.2.0.4 | gzip -c >... (3 Replies)
Discussion started by: a1_win
3 Replies

2. Shell Programming and Scripting

Gunzip a file in UNIX

hi All, i have a file called rsync-3.0.9.tar.gz, i have to unzip and then uncompress it. but at first while i am trying to unzip this file, it is giving me following error: -rw-r--r-- 1 bravodba bravodba 7278458 Aug 19 08:26 rsync-3.0.9.tar.gz bash-3.2$ unzip rsync-3.0.9.tar.gz Archive: ... (12 Replies)
Discussion started by: lovelysethii
12 Replies

3. AIX

How to install .tar.tgz file in AIX 6.1?

Hello, I have openssl.0.9.8.1103.tar.tgz file which I have downloaded from https://www14.software.ibm.com/webapp/iwm/web/reg/download.do?source=aixbp&S_PKG=openssl siteThe website says that the file name is openssl.0.9.8.1103.tar.z but when downloaded I get openssl.0.9.8.1103.tar.tgz as the... (2 Replies)
Discussion started by: gaugeta
2 Replies

4. UNIX for Dummies Questions & Answers

How to create .tgz file without creating .tar file?

Hi, Could anyone help me in providing command to generate .tgz file without creating .tar file? currently i am using below command for doing the same but if tar file has big size and there is no space in drive then tgz file will not be generated. I want to generate tgz file directly without... (4 Replies)
Discussion started by: Pawan Kumar
4 Replies

5. AIX

AIX6.1 Remove file descriptor from specified process

Hi, How to release file description area from specified process. Problem is that process started - open one file ( ~2GB ) - file has been removed - process still shown that file is used by process and can't release space on filesystem. It is not allowable to kill process !!! Regs,... (3 Replies)
Discussion started by: KrzysiekPi
3 Replies

6. Shell Programming and Scripting

How to create tgz file for all the directories in one time?

Hi, On server there is an one folder . which contains sub folder Eg - TEST folder contains test1, test2, execr ,tt (folder). also includes some text file like abc.txt psp.txt gg.log. here iwant to create tgz file for all the folders and file in one time. I know the command... (1 Reply)
Discussion started by: aish11
1 Replies

7. Shell Programming and Scripting

How to move files to existing .tgz file?

Hi, I have already created the tar files. which consist of some log files and Audit.csv plz see the below code for that ================================================ tar -Pczf ARCH/${arc_date}.tgz $LOG/*.log $REYE/CEP/FiAdapter/Audit.${arc_date}.csv ... (3 Replies)
Discussion started by: pspriyanka
3 Replies

8. UNIX for Advanced & Expert Users

how to grep/read a file inside compressed tgz without extract?

Hi all, I would like to ask whether in Unix shell/perl have any functions or command to allow grep/cat/read a file inside compressed .tgz without extract it? I know we can tar tvf a compressed tgz but this only allow we read the path/filename contained inside the tarball. If we want to read... (3 Replies)
Discussion started by: mayshy
3 Replies

9. UNIX for Dummies Questions & Answers

file.tgz.1of2 & file.tgz.2of2

Hi all, Need help. Anybody seen this kind of file before? file.tgz.1of2 file.tgz.2of2 how to extract this tgz file? Any help? Tq (5 Replies)
Discussion started by: zeedwolf
5 Replies

10. Windows & DOS: Issues & Discussions

*.tgz file on WinXP

Could anyone of y'all gurus tell me of how to open *.tgz files in WinXP....which program should i use to open it...i have tried going online to open it ut all in vain...please help Gerry... (5 Replies)
Discussion started by: gerald_agoi
5 Replies
Login or Register to Ask a Question