Actually I just tried it again and seems like it works. Earlier when I replied to you, I was passing the .tar.gz file through a pipe.
If I provide the file normally just xz is enough to extract it. Very strange.
in ~/test took 2s
❯ ls
4.21.1.tar.gz
in ~/test
❯ file 4.21.1.tar.gz
4.21.1.tar.gz: gzip compressed data, from Unix, original size modulo 2^32 9185280
in ~/test
❯ tar xf 4.21.1.tar.gz
in ~/test
❯ ls
i3-4.21.1/ 4.21.1.tar.gz
in ~/test
❯ ls i3-4.21.1 | head
AnyEvent-I3/
contrib/
debian/
docs/
etc/
i3-config-wizard/
i3-dump-log/
i3-input/
i3-msg/
i3-nagbar/
Example of failure:
in ~/test
❯ curl --silent -L 'https://github.com/i3/i3/archive/refs/tags/4.21.1.tar.gz' | tar xf -tar: Archive is compressed. Use -z optiontar:Errorisnot recoverable: exiting now
I think with GNU tar, tar xf works every timeEdit: I meant for all compression algorithms.EDIT 2: Fake news :)EDIT 3: idk man
Even with .gz? Might have to try it later because I’m curious. Thought you always needed the z flag for that.
Actually you are right. I just tested and the z flag is needed. Sorry about that.
Just tested,
tar -xf data.tar.gz
definitely works on Fedora 37.Actually I just tried it again and seems like it works. Earlier when I replied to you, I was passing the .tar.gz file through a pipe.
If I provide the file normally just xz is enough to extract it. Very strange.
in ~/test took 2s ❯ ls 4.21.1.tar.gz in ~/test ❯ file 4.21.1.tar.gz 4.21.1.tar.gz: gzip compressed data, from Unix, original size modulo 2^32 9185280 in ~/test ❯ tar xf 4.21.1.tar.gz in ~/test ❯ ls i3-4.21.1/ 4.21.1.tar.gz in ~/test ❯ ls i3-4.21.1 | head AnyEvent-I3/ contrib/ debian/ docs/ etc/ i3-config-wizard/ i3-dump-log/ i3-input/ i3-msg/ i3-nagbar/
Example of failure:
in ~/test ❯ curl --silent -L 'https://github.com/i3/i3/archive/refs/tags/4.21.1.tar.gz' | tar xf - tar: Archive is compressed. Use -z option tar: Error is not recoverable: exiting now