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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
11-01-2007, 10:39 PM
|
#1
|
LQ Newbie
Registered: Dec 2006
Posts: 6
Rep:
|
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
|
|
|
11-01-2007, 10:57 PM
|
#2
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
It may be the order of the parameters that's causing the problem.
Try tar -zxvvf programs.tar.gz.
|
|
|
11-01-2007, 11:00 PM
|
#3
|
LQ Newbie
Registered: Dec 2006
Posts: 6
Original Poster
Rep:
|
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 ...
|
|
|
11-01-2007, 11:18 PM
|
#4
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
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
|
|
|
11-01-2007, 11:24 PM
|
#5
|
LQ Newbie
Registered: Dec 2006
Posts: 6
Original Poster
Rep:
|
no
no, that does not work either.
|
|
|
11-01-2007, 11:31 PM
|
#6
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
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.
|
|
|
11-06-2007, 02:01 PM
|
#7
|
LQ Newbie
Registered: Oct 2007
Posts: 6
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 02:30 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|