二者的區別英文原文如下:
tar.gz and tar.xz both are compressed tar-files, but with different compression methods. tar.gz is compressed with the gzip compression utility, tar.xz with the xz utility. For the user there is no difference when extracting those files, both behave exactly the same.
簡單來說,兩種文件都是壓縮了的tar文件,只是壓縮算法不同。 tar.gz使用的是gzip壓縮工具,tar.xz使用的是xz工具。但對於使用者來說,二者的解壓沒有區別。
解壓命令舉例,可以解壓壓縮包到指定的文件夾。
tar -xvf test123.tar.xz -C ./Extracted/test123
參考資料
============