LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-01-2007, 10:39 PM   #1
itpurt
LQ Newbie
 
Registered: Dec 2006
Posts: 6

Rep: Reputation: 0
Unhappy problems decompressing *.tar.gz


I am having a problem decompressing a .tar.gz file

at the commandline I enter:

tar -xvvzf programs.tar.gz --> I got this command from multiple sites
in response i get:

Usage: tar {txruc@}[vfbFXhiBDEelmopwnq[0-7]] [-k size] [tapefile] [blocksize] [exclude-file] [-I include-file] files ...

what does thi mean? I am very confused. can someone tell me what is going on or tell me what i am doing wrong?

thanks
itpurt
 
Old 11-01-2007, 10:57 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,743

Rep: Reputation: 299Reputation: 299Reputation: 299
It may be the order of the parameters that's causing the problem.

Try tar -zxvvf programs.tar.gz.
 
Old 11-01-2007, 11:00 PM   #3
itpurt
LQ Newbie
 
Registered: Dec 2006
Posts: 6

Original Poster
Rep: Reputation: 0
Question

bigrigdriver,

thanks for your response. I tried the command you suggested; unfortunately, it did not work. I got the following error:

tar: z: unknown option
Usage: tar {txruc@}[vfbFXhiBDEelmopwnq[0-7]] [-k size] [tapefile] [blocksize] [exclude-file] [-I include-file] files ...
 
Old 11-01-2007, 11:18 PM   #4
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,743

Rep: Reputation: 299Reputation: 299Reputation: 299
I can't guess what version of tar you could be using that it doesn't recognize the -z option. So, try another variation:
tar --ungzip xvvf programs.tar.gz
 
Old 11-01-2007, 11:24 PM   #5
itpurt
LQ Newbie
 
Registered: Dec 2006
Posts: 6

Original Poster
Rep: Reputation: 0
no

no, that does not work either.
 
Old 11-01-2007, 11:31 PM   #6
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,743

Rep: Reputation: 299Reputation: 299Reputation: 299
Last thing I can think of to try: drop one of the v's.

tar --ungzip xvf programs.tar.gz

Many commands support the use of double v (vv). Maybe tar does; maybe tar does not.
 
Old 11-06-2007, 02:01 PM   #7
jljohnsonx
LQ Newbie
 
Registered: Oct 2007
Posts: 6

Rep: Reputation: 0
Lightbulb

When you want to extract the contents of a gzipped tar file, you have several choices. The first is to use gunzip followed by tar, like this:

gunzip programs.tar.gz
tar xvf programs.tar

Or you could do it all in one command, like this:

gunzip -c programs.tar.gz | tar xvf -

The -c flag tells gunzip to decompress the file, but instead of creating a something.tar file, it pipes the decompressed data directly to the tar command. The tar command on the right side of the pipeline looks a little strange, too--instead of a file name after the xvf, there's just a dash. The dash tells tar that the input is not an actual file on disk, but rather a stream of data from the pipeline. (Note that the gunzip input file is not deleted when you use the -c flag.)

Here's a third method of extracting the contents of a compressed tar file that's even easier. Remember the z flag with the tar command? You can use it to decompress and unbundle a tar file, like this:

tar xvzf programs.tar.gz

The end result is exactly the same (the files that were in the compressed tar file are now in your current directory), but this is much easier than issuing multiple commands or writing a messy-looking gunzip-tar pipeline.

J.J.
 
  


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 10 02-23-2008 05:40 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
decompressing .ps.gz not possible rohr Linux - Software 2 04-11-2005 04:11 AM
An error when decompressing .tar.bz2 file safrout Linux - General 6 08-15-2003 03:49 PM


All times are GMT -5. The time now is 03:38 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration