For GNU tar at least it's not necessary to specify the compression program when extracting--it will auto-detect it. Additionally when creating tar files it has -a, --auto-compress to use the file extension to determine the compression program to use.
Comments
For GNU tar at least it's not necessary to specify the compression program when extracting--it will auto-detect it. Additionally when creating tar files it has -a, --auto-compress to use the file extension to determine the compression program to use.
http://www.gnu.org/software/tar/manual/html_node/gzip.html#a...
Recent versions of BSD tar will also detect the compression algorithm for extracting. No such luck with the -a, --auto-compress option though.
Bsdtar definitely supports -a. I'm on a phone so I can't help too much but its the first option after you Ctrl+f for getopt on https://github.com/libarchive/libarchive/blob/master/tar/bsd...