tags:

views:

29

answers:

3

I am trying to unpackage "gcc-4.4_4.4.3.orig.tar.gz." After reading 5 sites from Google to do the unpackage, I cannot figure it out.

Please tell me how to unpackage "gcc-4.4_4.4.3.orig.tar.gz."

thanks

+2  A: 
tar xzvf gcc-4.4_4.4.3.orig.tar.gz

for a gziped file (like .tar.gz)

and

tar xJvf gcc-4.4_4.4.3.orig.tar.xz

for a file like .tar.xz

Cedric H.
thanks - now I have this:gcc-4.4.3.tar.xz
Kevin
Don't understand ...
Cedric H.
After I run your command (thank you, by the way), this folder now exists:gcc-4.4_4.4.3.orig/gcc-4.4.3.tar.xz
Kevin
@Cedric H.: `tar -xzvf gcc-4.4_4.4.3.orig.tar.gz` I'd say. (you missed the `-` at the beginning, denoting a parameter)
Piskvor
Piskvor, I typed it in again very carefully. Same thing occurs:tar xzvf gcc-4.4_4.4.3.orig.tar.gz creates a new directory and file: .....................................................gcc-4.4_4.4.3.orig/gcc-4.4_4.4.3.tar.xz
Kevin
@Piskvor: it works without the minus sign@Kevin: run the same command on the newly created file ?
Cedric H.
@Cedric: error - output: gzip: stdin: not in gzip format \n tar: Child returned status 1 \n tar: Error exit delayed from previous errors
Kevin
Ok sorry, try `tar xJvf ...`
Cedric H.
@Cedric H.: Ah, I live and learn.
Piskvor
output: "tar: invalid option -- J"
Kevin
Then you need something else to extract from that (http://en.wikipedia.org/wiki/Xz).But maybe you can download another clean gcc (http://gcc.gnu.org/mirrors.html).
Cedric H.
Nothing is wrong here. extracting gcc-4.4_4.4.3.orig.tar.gz yields gcc-4.4_4.4.3.orig/gcc-4.4_4.4.3.tar.xz among other things. Just extract that too.
nos
A: 

i dunno where you got that file, but XZ extraction is:

tar Jxf gcc-4.4.3.tar.xz

Dustin Getz
output: "tar: invalid option -- J"
Kevin
your system is out of date and doesn't support XZ. go download an official tar.gz from gcc.org
Dustin Getz
A: 

Instead of remembering the flag to select a compression type when extracting an archive, you can let GNU tar (version >= 1.20) autodetect it for you. Example:

tar xf archive.tar.gz
tar xf archive.tar.bz2
tar xf archive.tar.xz

The same thing of course works for listing an archive as well:

tar tf archive.tar.gz
tar tf archive.tar.bz2
tar tf archive.tar.xz

To create an archive, you can use the -a (or --auto-compress) flag, which makes tar use the file suffix to do the right thing:

tar caf archive.tar.gz file ...
tar caf archive.tar.bz2 file ...
tar caf archive.tar.xz file ...
Joel Rosdahl