@omenos If I were guessing, I'd say it may be hard(er) to make format detection code safe without using fseek(), which doesn't work for stdin.
> hyphen-less syntax doesn't work.
Why? Let me check. `cat ~/Download/terminus-font-4.49.1.tar.gz | tar -tz` works fine for me.
@steelman @april @blakecoverett Yeah, I'm not expecting it to be an easy or reasonably possible thing to support. It's just something I forget differs from time to time.
For piping, I was referring to needing to specify the hyphen for tar's parameters, rather than stdin itself. e.g. "tar xz" vs "tar -xz".
@leftpaddotpy @JoYo @april @float13 you would assume so, but no, it's not needed either, if you use the `a` flag, see the man. :)
@[email protected] @[email protected] yes, it's unnecessary, and even when creating an archive, you can use the `a` flag to autodetect format. $ tar acf directory{.tar.gz,} $ tar acf directory{.tar.bz2,} $ tar acf directory{.tar.xz,} $ file directory.* directory.tar.bz2: bzip2 compressed data, block size = 900k directory.tar.gz: gzip compressed data, from Unix, original size modulo 2^32 28272640 directory.tar.xz: XZ compressed data, checksum CRC64
@bartek @april yes, it's unnecessary, and even when creating an archive, you can use the `a` flag to autodetect format.
$ tar acf directory{.tar.gz,}
$ tar acf directory{.tar.bz2,}
$ tar acf directory{.tar.xz,}
$ file directory.*
directory.tar.bz2: bzip2 compressed data, block size = 900k
directory.tar.gz: gzip compressed data, from Unix, original size modulo 2^32 28272640
directory.tar.xz: XZ compressed data, checksum CRC64
@tshirtman @april Nice.
Still, given that zip is an open format, and unlike tar has proper structure, with index, checksums, etc, I'd rather see it used more often.
It's already being used by so much of open-source as the basis of package format, yet so many still stick to tar.
Wait, what?
I've been doing this "the old way" for almost 20 years and never noticed?
A pox upon your co-worker! Get out of my yard!
@april the '-' is not needed anymore, but i'm not going to lookup since when.
`tar xf filename`
edit: should have read the other comments, you knew that already.