xz refuses to unpack files that do not end with .xz suffix, which is
plain stupid.
daniel@daniel-desktop:~/Downloads$ file binN4AC1CEQIn.bin
binN4AC1CEQIn.bin: XZ compressed data
daniel@daniel-desktop:~/Downloads$ xz --decompress binN4AC1CEQIn.bin
xz: binN4AC1CEQIn.bin: Filename has an unknown suffix, skipping
daniel@daniel-desktop:~/Downloads$ mv binN4AC1CEQIn.bin binN4AC1CEQIn.bin.xz
daniel@daniel-desktop:~/Downloads$ xz --decompress binN4AC1CEQIn.bin.xz
daniel@daniel-desktop:~/Downloads$
--
Address: Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email: daniel....@progress-technologies.net
Internet: http://people.progress-technologies.net/~daniel.baumann/
--
To UNSUBSCRIBE, email to debian-bugs-...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listm...@lists.debian.org
Daniel Baumann wrote:
> xz refuses to unpack files that do not end with .xz suffix, which is plain
> stupid.
I don't think it's stupid.
$ gzip foo.c
$ mv foo.c.gz foo.bin
$ gzip -d foo.bin
gzip: foo.bin: unknown suffix -- ignored
$ gzip -dc foo.bin
hello, world
Is there some reason "xz -dc" does not work for you?
just because gzip is as stupid doesn't make xz any less.
> Is there some reason "xz -dc" does not work for you?
obviously i do not want to decompress to stdout (nor to redirect into a
file), i just want to decompress.
--
Address: Daniel Baumann, Donnerbuehlweg 3, CH-3012 Bern
Email: daniel....@progress-technologies.net
Internet: http://people.progress-technologies.net/~daniel.baumann/
--
Daniel Baumann wrote:
> On 08/25/2011 11:21 AM, Jonathan Nieder wrote:
>> Is there some reason "xz -dc" does not work for you?
>
> obviously i do not want to decompress to stdout (nor to redirect into a
> file), i just want to decompress.
It was not obvious to me. Depending on your preferred name for the
decompressed file, you have at least two choices:
- use -S.bin to use .bin as the suffix to strip, instead of .xz
- implement a --output=<path> option and send a patch to
xz-d...@tukaani.org (subscription required[1]). The patch
description can explain why "xz -dc infile >outfile" is not good
enough and how it works in the case infile=outfile.
Hope that helps, though I'm not sure what I'm adding here that the man
page does not provide. I'm glad to hear you're finding xz useful to
at least decompress a file or two. :)
Cheers,
Jonathan
[1] http://tukaani.org/xz/lists.html