Hi, I'm using gnu tar 1.28 as packaged on Ubuntu (xenial) and also tried 1.27 on 15.10. Please forgive me if this feature is already added upstream.
Tar's determination of compression is very handy: $ tar -tf foo.tar.gz $ tar -tf foo.tar $ tar -tf foo.tar.xz My issue is that it only works if input is from a file. The following do not work: $ wget http://example.com/some.tar.gz | tar -tf - $ tar -tf - < my.tar.gz tar: Archive is compressed. Use -z option tar: Error is not recoverable: exiting now It would be nice if tar just read into a buffer, determined the format there and then went on. Thanks for your work on GNU Tar. Scott