4 ms·
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
by Splognosticus 11y ago
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#auto_002dcompress http://www.gnu.org/software/tar/manual/html_node/gzip.html#a...
- spartas 11y agoRecent versions of BSD tar will also detect the compression algorithm for extracting. No such luck with the -a, --auto-compress option though.
- craftkiller 11y agoBsdtar 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/bsdtar.c https://github.com/libarchive/libarchive/blob/master/tar/bsd...