Clicky

Harry R. Schwartz

Software engineer, nominal scientist, gentleman of the internet. Member, ←Hotline Webring→.


Compression Algorithm Detection with tar

Published 26 Mar 2017. Tags: beards.

I’ve always unpacked tarballs manually according to extension:

I just happened to check the manpage for the first time in a decade or so and stumbled across this gem:

-a, --auto-compress
       Use archive suffix to determine the compression program.

Nice! Instead of remembering the arbitrary flag for each compression algorithm, you can always use tar xavf and tar will figure out the right thing to do.

There’s some good stuff in that documentation, it turns out.