Smart Tar

It’s fully ensconced in my muscle memory: tar -xzf somepackage.tar.gz to untar a gzip-compressed tarball. But what if the tarball is compressed with Bzip2? You have to use tar -xjf or tar won’t understand the compression format.

Or, on MacOSX, just use tar -xf on either compression format and tar figures it out for itself. And that’s the way it should be: smart software that can find out on what file format it operates.

But my fingers still want to tar -xzf

Be Sociable, Share!