Compress in Tar with XZ algorithm on macOS

“It just works” just doesn’t happen with lossless compression on Mac. Most softwares are completely outdated with insufficient GUI support, and they seem to lack the sense of universality at its core. Users already have universal unarchiver, for the most part free. The real priority, which is to support as many as formats to serve different purposes, is lost to frivolous format warfare.

That being said, it is not impossible to compress a file in tar.xz on Mac. The OS simply doesn’t have any GUI tools available, just CLI. So in order to compress files in Tar, you will need to run the following command on Terminal:

Compress in .tar.xz:
 tar -cJf [path to archive].tar.xz [path to files]

Simply replace two bracketed items and run the command, and you are good to go. FYI, Terminal will not give you any visual progress bars. So unless you are absolutely certain compressing has come to a grinding halt, just give it some time. Xz is notoriously slower compared to gz, but it comes with higher compression rate. Try different methods for different purposes.

Leave a comment