LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-12-2006, 12:27 AM   #1
thammerlund
LQ Newbie
 
Registered: Jul 2006
Posts: 22

Rep: Reputation: 15
tar error


Hi,

I keep getting an error when I try to unpack a file using tar.

I tried downloading postgresql-8.1.4.tar.gz using wget, but that didn't work so I went through Windows/Samba and unpacked it to /usr/local using gunzip. Now I have postgresql-8.1.4.tar, but when I used tar to try to unpack it it threw an error saying that it's not in gzip format.

Here's the command I put in and the error:
Code:
#tar -xzf postgresql-8.1.4.tar

gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error exit delayed from previous errors
Any ideas? Thank you,
Tom
 
Old 07-12-2006, 12:31 AM   #2
bcfriesen
LQ Newbie
 
Registered: Nov 2005
Distribution: Ubuntu 7.10
Posts: 16

Rep: Reputation: 0
Drop the "z" option. That's for gzip files, while yours is only a tar. Do this:

Code:
tar -xvf postgresql-8.1.4.tar
The -v is for "verbose." I like to know what my shell is doing.
 
Old 07-12-2006, 12:34 AM   #3
thammerlund
LQ Newbie
 
Registered: Jul 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by bcfriesen
Drop the "z" option. That's for gzip files, while yours is only a tar. Do this:

Code:
tar -xvf postgresql-8.1.4.tar
The -v is for "verbose." I like to know what my shell is doing.
So if I had postgresql-8.1.4.tar.gz, I'd use the "z" option?

Thank you for your help.
 
Old 07-12-2006, 12:39 AM   #4
bcfriesen
LQ Newbie
 
Registered: Nov 2005
Distribution: Ubuntu 7.10
Posts: 16

Rep: Reputation: 0
Quote:
So if I had postgresql-8.1.4.tar.gz, I'd use the "z" option?
Bingo. ;-)
 
Old 07-12-2006, 01:16 AM   #5
thammerlund
LQ Newbie
 
Registered: Jul 2006
Posts: 22

Original Poster
Rep: Reputation: 15
Thank you for all your help!
 
Old 07-12-2006, 01:56 AM   #6
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Code:
tar -zxvf filename.tar.gz
that is how you are able to unzip and untar a file all at one pass.

z is for gzip
v is for verbose printing. (Meaning show each file)
f Use the tarfile argument as the name of the tarfile

not sure what the x was for.
 
Old 07-12-2006, 02:20 AM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
x = extract (!)
t = table of contents ie list contents without extracting them (use instead of x)
c = create tarfile
etc
etc see
man tar
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 03:48 AM
getting error during "tar -xvzf filename.tar.gz" b0nd Linux - Newbie 11 04-23-2005 09:50 PM
Tar gives error when creating a tar file archive davidas Linux - Newbie 10 04-13-2004 01:35 AM
Error while installing package.tar.tar isone Linux - Software 2 11-03-2003 12:58 PM
problem unzipping a tar.bz2 file tar: Error is not recov jyome Linux - Software 4 09-04-2003 02:04 PM


All times are GMT -5. The time now is 12:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration