|
|
Subscribe / Log in / New account

No more .bz2 files from kernel.org

No more .bz2 files from kernel.org

Posted Dec 28, 2013 20:44 UTC (Sat) by theophrastus (guest, #80847)
In reply to: No more .bz2 files from kernel.org by jhoblitt
Parent article: No more .bz2 files from kernel.org

thank you for the explanation, one and all.

(so... "sudo apt-get install lzma".

hnh, even the informational messages are 'compressed':

>unlzma -v -t fred.lzma
fred.lzma: decoded succesfully

..or just too sophisticated for spelling [wink])


to post comments

No more .bz2 files from kernel.org

Posted Dec 28, 2013 20:55 UTC (Sat) by josh (subscriber, #17465) [Link] (5 responses)

You actually want xz-utils installed. Then use tar xf (without the usual z, j, or J), and tar will autodetect the right decompression tool to use.

No more .bz2 files from kernel.org

Posted Dec 29, 2013 21:17 UTC (Sun) by FranTaylor (guest, #80190) [Link] (2 responses)

This is a handy package to install because it will allow you to write install scripts that will break on every other platform.

No more .bz2 files from kernel.org

Posted Dec 29, 2013 21:47 UTC (Sun) by josh (subscriber, #17465) [Link]

Autodetection of decompressors is a built-in feature of tar; installing the package just gives tar the decompression tools it needs.

No more .bz2 files from kernel.org

Posted Jan 4, 2014 2:43 UTC (Sat) by k8to (guest, #15413) [Link]

Not really. The flags like I and j and so on only exist in gnu tar for the most part and aren't entirely standard across the history of gnu tar patches either. If you're dealing with some other tar, there's not going to be a way to ask it to unpack the .xz file for you anyway.

The only way to make slightly clearer shellscripts is to manually invoke the unpack with a pipe, and the danger to neglect to do so is opened by installing gnu tar. You could install schilly's tar if you want!

No more .bz2 files from kernel.org

Posted Dec 30, 2013 13:15 UTC (Mon) by clopez (guest, #66009) [Link] (1 responses)

You use 'a' to enable autodetection:

tar xfav file.tar.xz

No more .bz2 files from kernel.org

Posted Dec 30, 2013 19:43 UTC (Mon) by josh (subscriber, #17465) [Link]

That's only for auto-compression based on file extension. Auto-decompression requires no option:

/tmp$ tar caf foo.tar.xz foo
/tmp$ file foo.tar.xz
foo.tar.xz: XZ compressed data
/tmp$ tar xf foo.tar.xz
/tmp$ tar tf foo.tar.xz
foo/
foo/bar


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds