Comment by mkl
> tar -cf archive.tar.gz foo bar
This will create an uncompressed .tar with the wrong name. You need a z option to specify gzip.
> tar -cf archive.tar.gz foo bar
This will create an uncompressed .tar with the wrong name. You need a z option to specify gzip.
If you add a for auto, it will choose the right compression based on the file name.
tar -caf foo.tar.xz foo
Will be an xz compressed tarball.
Apparently this is now automatically determined by the file name, but I still habitually add the flag. 30 years of muscle memory is hard to break!