Mailing List Archive

lzma archives
How to extract lzma archives?
--
Regards, Nickolay Hodyunya.
Re: lzma archives [ In reply to ]
On Wed, Nov 5, 2008 at 2:38 PM, Nickolay Hodyunya <nickolayh@gmail.com> wrote:
> How to extract lzma archives?

by lzma archive, you probably mean a lzma-compressed tar archive.
You can extract them with
lzma -dc compressedarchive.tar.lzma | tar -xv -f -
or, if your version of tar supports it,
tar --lzma -xv -f compressedarchive.tar.lzma

The command lzma comes from app-arch/lzma-utils, and these days the
distros ship it by default.

--
Software is like sex: it is better when it is free - Linus Torvalds
Re: lzma archives [ In reply to ]
On Wednesday 5 November 2008, 17:38, Nickolay Hodyunya wrote:
> How to extract lzma archives?

$ eix lzma
* app-arch/lzma
Available versions: ~4.27 ~4.43 ~4.57 {doc}
Homepage: http://www.7-zip.org/sdk.html
Description: LZMA Stream Compressor from the SDK

[U] app-arch/lzma-utils
Available versions: 4.32.6 4.32.7 {nocxx}
Installed versions: 4.32.6(13:00:02 22/09/08)(-nocxx)
Homepage: http://tukaani.org/lzma/
Description: LZMA interface made easy
Re: lzma archives [ In reply to ]
On Wed, Nov 05, 2008 at 11:38:44PM +0700, Nickolay Hodyunya wrote:
> How to extract lzma archives?

emerge lzma-utils && man lzma

--
v4sw5RUYhw2ln3pr5ck0ma2u7Lw3+2Xm0l6/7Gi2e2t3b6AKMen5+7a16s0Sr1p-5.62/-6.56g6OR
Re: lzma archives [ In reply to ]
Nickolay Hodyunya wrote:
> How to extract lzma archives?
>
package: lzma-utils
command: lzma -d <filename>
Re: lzma archives [ In reply to ]
Jorge Peixoto de Morais Neto schrieb:
> On Wed, Nov 5, 2008 at 2:38 PM, Nickolay Hodyunya <nickolayh@gmail.com> wrote:
>> How to extract lzma archives?
>
> by lzma archive, you probably mean a lzma-compressed tar archive.
> You can extract them with
> lzma -dc compressedarchive.tar.lzma | tar -xv -f -

This command line can be simplified:
unlzma -c compressedarchive.tar.lzma | tar xv

Most better desktop archive managers (for example file-roller for GNOME)
can handle these archives nowadays.
Re: lzma archives [ In reply to ]
On Thursday 6 November 2008, 11:39, Florian Philipp wrote:
> Jorge Peixoto de Morais Neto schrieb:
> > On Wed, Nov 5, 2008 at 2:38 PM, Nickolay Hodyunya
<nickolayh@gmail.com> wrote:
> >> How to extract lzma archives?
> >
> > by lzma archive, you probably mean a lzma-compressed tar archive.
> > You can extract them with
> > lzma -dc compressedarchive.tar.lzma | tar -xv -f -
>
> This command line can be simplified:
> unlzma -c compressedarchive.tar.lzma | tar xv

why not directly

tar --lzma -xvf compressedarchive.tar.lzma

then? (I hope I got the syntax right)
Re: lzma archives [ In reply to ]
On Thu, Nov 6, 2008 at 8:39 AM, Florian Philipp
<lists@f_philipp.fastmail.net> wrote:
> Jorge Peixoto de Morais Neto schrieb:
>> On Wed, Nov 5, 2008 at 2:38 PM, Nickolay Hodyunya <nickolayh@gmail.com> wrote:
>>> How to extract lzma archives?
>>
>> by lzma archive, you probably mean a lzma-compressed tar archive.
>> You can extract them with
>> lzma -dc compressedarchive.tar.lzma | tar -xv -f -
>
> This command line can be simplified:
> unlzma -c compressedarchive.tar.lzma | tar xv

I like to do things right (I love Math, exactness and rigor). From
tar's info page

If you don't specify this argument [the argument to -f] , then
`tar' will examine the
environment variable `TAPE'. If it is set, its value will be used as
the archive name. Otherwise, `tar' will use the default archive,
determined at the compile time. [...] If there is no tape drive
attached, or the default is not meaningful, then `tar' will print an
error message. The error message might look
roughly like one of the following:

tar: can't open /dev/rmt8 : No such device or address
tar: can't open /dev/rsmt0 : I/O error

To avoid confusion, we recommend that you always specify an archive file
name by using `--file=ARCHIVE-NAME' (`-f ARCHIVE-NAME') when writing
your `tar' commands.

Regarding old-style tar options (that is, tar options without a dash):

old style syntax makes it difficult to match
option letters with their corresponding arguments, and is often
confusing
[...]

This old way of writing `tar' options can surprise even experienced
users. For example, the two commands:

tar cfz archive.tar.gz file
tar -cfz archive.tar.gz file

are quite different.


So I use either tar --lzma -xv -f compressedarchive.tar.lzma or, when
using an old tar,
lzma -dc compressedarchive.tar.lzma | tar -xv -f -
Re: lzma archives [ In reply to ]
"Jorge Peixoto de Morais Neto" <please.no.spam.here@gmail.com> wrote:

> This old way of writing `tar' options can surprise even experienced
> users. For example, the two commands:
>
> tar cfz archive.tar.gz file
> tar -cfz archive.tar.gz file
>
> are quite different.
>
>
> So I use either tar --lzma -xv -f compressedarchive.tar.lzma or, when
> using an old tar,
> lzma -dc compressedarchive.tar.lzma | tar -xv -f -

The "correct" official tar syntax does not use '-'. If you like to be 100%
that a tar command should work, ddon't use '-' in front of options.

BTW: "star" autodetects 7z compression and calls the program "p7zip" to unpack
the archive transparently.

Jörg

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni)
schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
Re: lzma archives [ In reply to ]
Am Freitag 07 November 2008 09:50:45 schrieb Joerg Schilling:

> The "correct" official tar syntax does not use '-'. If you like to be 100%
> that a tar command should work, ddon't use '-' in front of options.

Yes, sure. That's why

% tar --lzma tvf /gentoo/distfiles/texlive-module-context-
vim.doc-2008.tar.lzma
tar: You must specify one of the `-Acdtrux' options
Try `tar --help' or `tar --usage' for more information.

just works. Or does it need to be -tvf? The "correct" syntax is the one used
by the version of tar one is using. For the most of us, this is GNU tar.

Bye...

Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
Re: lzma archives [ In reply to ]
Dirk Heinrichs <dirk.heinrichs.ext@nsn.com> wrote:

> Am Freitag 07 November 2008 09:50:45 schrieb Joerg Schilling:
>
> > The "correct" official tar syntax does not use '-'. If you like to be 100%
> > that a tar command should work, ddon't use '-' in front of options.
>
> Yes, sure. That's why
>
> % tar --lzma tvf /gentoo/distfiles/texlive-module-context-
> vim.doc-2008.tar.lzma
> tar: You must specify one of the `-Acdtrux' options
> Try `tar --help' or `tar --usage' for more information.
>
> just works. Or does it need to be -tvf? The "correct" syntax is the one used
> by the version of tar one is using. For the most of us, this is GNU tar.

GNU tar is not 100% with parsing command lines in a standard compliant way,
but omitting the '-' is correct.

It you add "--lzma" you use a 100% on-portable command line.

Jörg

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni)
schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
Re: lzma archives [ In reply to ]
Am Freitag 07 November 2008 11:15:09 schrieb Joerg Schilling:

> GNU tar is not 100% with parsing command lines in a standard compliant way,
> but omitting the '-' is correct.

Which standard?

> It you add "--lzma" you use a 100% on-portable command line.

So what?

Bye...

Dirk
--
Dirk Heinrichs | Tel: +49 (0)162 234 3408
Configuration Manager | Fax: +49 (0)211 47068 111
Capgemini Deutschland | Mail: dirk.heinrichs@capgemini.com
Wanheimerstraße 68 | Web: http://www.capgemini.com
D-40468 Düsseldorf | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: wwwkeys.pgp.net
Re: lzma archives [ In reply to ]
Dirk Heinrichs <dirk.heinrichs.ext@nsn.com> wrote:

> Am Freitag 07 November 2008 11:15:09 schrieb Joerg Schilling:
>
> > GNU tar is not 100% with parsing command lines in a standard compliant way,
> > but omitting the '-' is correct.
>
> Which standard?

SUSv2, the precursor of SUSv3 (also known as POSIX.1-2001).

SUSv2 is the latest standard that includes tar.

Jörg

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni)
schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
Re: lzma archives [ In reply to ]
Am Freitag, 7. November 2008 11:46:30 schrieb Joerg Schilling:

> SUSv2, the precursor of SUSv3 (also known as POSIX.1-2001).

OK, thanks.

Bye...

Dirk
Re: lzma archives [ In reply to ]
On Fri, Nov 07, 2008 at 11:46:30AM +0100, Joerg Schilling wrote:

> SUSv2 is the latest standard that includes tar.

And we should use pax instead of tar looking to SUSv3.

Not sure pax can internaly deal with lzma file format.

--
Nicolas Sebrecht
Re: lzma archives [ In reply to ]
Nicolas Sebrecht <nicolas.s-dev@laposte.net> wrote:

>
> On Fri, Nov 07, 2008 at 11:46:30AM +0100, Joerg Schilling wrote:
>
> > SUSv2 is the latest standard that includes tar.
>
> And we should use pax instead of tar looking to SUSv3.
>
> Not sure pax can internaly deal with lzma file format.

There are many pax implementations and the pax implementation that is usually
seen on Linux is based on GNU cpio. This program has more problems than GNU
tar...

Jörg

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni)
schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily
Re: lzma archives [ In reply to ]
On Sat, Nov 08, 2008 at 08:00:38PM +0100, Joerg Schilling wrote:

> There are many pax implementations and the pax implementation that is usually
> seen on Linux is based on GNU cpio.

Weird. The implementation that I've ever seen on Linux platforms is the BSD one.

--
Nicolas Sebrecht
Re: lzma archives [ In reply to ]
Nicolas Sebrecht <nicolas.s-dev@laposte.net> wrote:

>
> On Sat, Nov 08, 2008 at 08:00:38PM +0100, Joerg Schilling wrote:
>
> > There are many pax implementations and the pax implementation that is usually
> > seen on Linux is based on GNU cpio.
>
> Weird. The implementation that I've ever seen on Linux platforms is the BSD one.

There are two different "BSD" pax implementations.

As there is a new "archive library" on FreeBSD that tries to allow different
CLI implementation bases on the same basic code (similar to what star does),
there may even a third pax implementation on *BSD.

Jörg

--
EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
js@cs.tu-berlin.de (uni)
schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily