Gunzip a file in UNIX

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Gunzip a file in UNIX
# 8  
Old 08-19-2013
here is the output of tar and the os version:

-bash-3.2$ tar -xvzf rsync-3.0.9.tar.gz
tar: z: unknown function modifier
Usage: tar {c|r|t|u|x}[BDeEFhilmnopPqTvw@[0-7]][bfk][X...] [blocksize] [tarfile] [size] [exclude-file...] {file | -I include-file | -C directory file}...
-bash-3.2$ uname -a
SunOS usa0300uz1226 5.10 Generic_148888-01 sun4u sparc SUNW,SPARC-Enterprise
# 9  
Old 08-19-2013
SunOS, ok.
Then try
tar xvf rsync-3.0.9.tar.gz

(Do NOT add the hyphen "-" nor the z option, which seem to not be available in SunOS)
Note that this will untar and uncompress your file in your current directory. If you want to perform the same operation but save the results in a different directory, you should do:
tar xvf rsync-3.0.9.tar.gz -C /full/path/to/your/directory

# 10  
Old 08-19-2013
-bash-3.2$ tar xvf rsync-3.0.9.tar.gz
tar: directory checksum error

it also has some error.

Last edited by Franklin52; 08-20-2013 at 04:18 AM.. Reason: Please use code tags
# 11  
Old 08-19-2013
gunzip -c rsync-3.0.9.tar.gz | tar xvf -

gunzip <rsync-3.0.9.tar.gz | tar xvf -

# 12  
Old 08-20-2013
Originally Posted by lovelysethii
used it, but getting some error:

bash-3.2$ gunzip rsync-3.0.9.tar.gz

gzip: rsync-3.0.9.tar.gz: invalid compressed data--format violated
# 13  
Old 08-20-2013
Originally Posted by lovelysethii
-bash-3.2$ tar xvf rsync-3.0.9.tar.gz
tar: directory checksum error

it also has some error.
Based on this error, I'd say your tarball is corrupted or wasn't properly downloaded (maybe there was a network glitch when you were downloading it). I am not very familiar with Solaris myself, but if you're trying to install rsync, I'd suggest you look into another way of doing it (some kind of repos, maybe? Excuse my ignorance as to the package management system Solaris uses).
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 - | gzip -c >... (3 Replies)
Discussion started by: a1_win
3 Replies

2. Solaris

Gunzip: File too large error

Hello All, I'm trying to write a script to load the MySQL DB from a dump file but the unzipping doesnt seem to work, not sure whats the issue, i get below error bash>gunzip mysql2-dump.gz gunzip: mysql2-dump: File too large bash > can anyone pls let me know how to sort this out? ... (2 Replies)
Discussion started by: Mahesh_RPM
2 Replies

3. Shell Programming and Scripting

Not able to gunzip a .gz file, in ksh

i am working on unix - ksh trying to unzip a .gz file and when i executed the below, in my command prompt in ksh gunzip abc.gz it was throwing the message below: gunzip: abc.gz: unexpected end of file - pls advise what is the reason for it..i am pretty sure the .gz file had no issues. (3 Replies)
Discussion started by: billpeter3010
3 Replies

4. Shell Programming and Scripting

Searching inside a .gz file without gunzip

I have a set of folders inside which there may be n number of files. All those files are in .gz extension. Now I need to search all the files without gunzip them. Also I need to read the content of a file if the search pattern is found without gunzip them. (3 Replies)
Discussion started by: realspirituals
3 Replies

5. Shell Programming and Scripting

Decompress (with gunzip) recursively, but do not delete original gz file

Hi all, I have a folder hierarchy with many gz files in them. I would like to recursively decompress them, but keep the original files. I would also like to move all the decompressed files (these are very large HDF5 files with .CP12 extension) to another data folder. Currently I am using four... (3 Replies)
Discussion started by: gansvv
3 Replies

6. AIX

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... (12 Replies)
Discussion started by: pilotHans
12 Replies

7. Solaris

gunzip problem! unexpected end of file

I've downloaded the tomcat from the link below and ftp to Solaris by ftp in binary mode Ref: Index of /dist/jakarta/tomcat-5/v5.0.30/bin gunzip -c jakarta-tomcat-5.0.30.tar.gz | tar -xvf - gunzip: jakarta-tomcat-5.0.30.tar.gz: unexpected end of file tar: read error: unexpected EOF ... (8 Replies)
Discussion started by: sbox
8 Replies

8. UNIX for Dummies Questions & Answers

Using gunzip to decompress .zip file

Hi, I have a zipped Oralce software ( and I need to unzip it. On the Linux server, I only see the gunzip utility listed: $ ls -ltr *zip* -rwxr-xr-x 3 root root 60320 Jan 15 2008 gzip -rwxr-xr-x 3 root root 60320 Jan 15 2008 gunzip Can I use the command... (1 Reply)
Discussion started by: syang68
1 Replies

9. UNIX for Advanced & Expert Users

gunzip: unexpected end of file

Ok, I sent several gzipped files using the UNIX "mail" utility without any special settings (bad idea). When I saved these files from my mail and tried to gunzip them, I would get something like the following error: gunzip: wmGrep.mel.gz: unexpected end of file Ok, I messed up. But is it... (4 Replies)
Discussion started by: sicjedi
4 Replies

10. UNIX for Dummies Questions & Answers

Gunzip : unexpected end of file

Hi, While uncompress , gunzip filename.cpio.gz getting the fg. error gunzip: filename.cpio.gz: unexpected end of file. Whats the problem? Size of this .gz file is 660mb . Thanks, (1 Reply)
Discussion started by: Dolly
1 Replies
Login or Register to Ask a Question