I am a newbie Unix user. I have a file whose extension is pkg.tar.xz. How can I unpack this file on Windows or Unix?

I can use Cygwin but I'm not sure which utility I'd need to use. Any ideas?

link|improve this question
You want to unpack it in windows? – Rahul Jul 14 '11 at 17:23
2  
I see that you accepted my answer, but if your file's extension is really what you say it is, you should have accepted Bradley's answer. – parsifal Jul 14 '11 at 18:46
feedback

migrated from stackoverflow.com Jul 15 '11 at 7:24

This question came from our site for professional and enthusiast programmers.

3 Answers

up vote 3 down vote accepted

If you've got Cygwin installed, then create a new directory and execute the following from within it:

tar zxvf FILE.tgz

If the person who produced the file was polite, it will contain its own top-level directory. If the person was impolite, it might contains lots of files, and you want a directory to contain them all.

link|improve this answer
1  
The z in that won't work as it's an xz, not a gz. Meaning it's been packaged with LZMA instead of gzip. – Bradley Swain Jul 14 '11 at 17:24
@Bradley - my bad, I misread the OP. – parsifal Jul 14 '11 at 17:30
I did at first as well. :) – Bradley Swain Jul 14 '11 at 17:31
@upvoter - thanks, but Bradley's answer is the correct one – parsifal Jul 14 '11 at 17:35
feedback

In cygwin, you can use the following command at the command line: tar xvJf pkg.tar.xz. EDIT: note that that's a capital J, which is the flag for LZMA (xz), not a lower-case j, which is the flag for bzip2.

In Windows, I would recommend using 7-Zip

link|improve this answer
feedback

Googling around:

7-Zip supports xz as of version 9.04 beta

From Wikipedia

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.