主要参考:http://bbs.chinaunix.net/thread-3610738-1-1.html



现在很多找到的软件都是tar.xz的格式的,xz 是一个使用 LZMA压缩算法的无损数据压缩文件格式。 和gzip与bzip2一样,同样支持多文件压缩,但是约定不能将多于一个的目标文件压缩进同一个档案文件。 相反,xz通常作为一种归档文件自身的压缩格式,例如使用tar或cpioUnix程序创建的归档。
xz 在GNU coreutils(版本 7.1 或更新) 中被使用。 xz 作为压缩软件包被收录在 Fedora (自Fedora 12起) , Arch Linux , FreeBSD、 Slackware Linux、CRUX 和 Funtoo中。



xz utils 是 lzma utils 的下一代lzma utils 改名 xz utils。

压缩时 xz utils 耗时比 bzip2 长一倍,

压缩时 xz utils 耗时是 lzma utils 一半,

压缩时 xz utils 生成文件体积是 bzip2 的一半,

压缩时 xz utils 生成文件体积比 lzma utils 略大,

解压时 xz utils 耗时是 bzip2 的三分之一,

解压时 xz utils 速度比 lzma utils 略快,

解压时 xz utils 耗时仅比 gzip 多一倍。

压缩时 xz utils 使用 *.xz 格式 生成文件 比 *.lzma 格式 略大,

测试样本较小,多次测试结果有出入,无法判断 xz utils 使用 *.xz 与 *.lzma 格式 压缩与解压时间 谁占优势。



到目前为止,lzma utils 的压缩率仍是最大的,xz utils 解压时间占优势。

一个 xz 文件格式的实现XZ 实用程序已可在网上自由获得。GNU tar自版本1.22起使用这一软件透明支持xz文件格式(就如同其处理gzip格式或者bzip2格式一样)。  随着大量软件进入了公有领域(例如 liblzma等) 程序的4.999.9beta版本实现在GNU LGPL
和 GNU GPL条款下发布。



7-Zip在9.04 beta版支持了xz文件格式。 



首先到[url]http://download.chinaunix.net/download/0014000/13078.shtml[/url]

或:

http://download.csdn.net/detail/duanyipeng/6018631



页面下载xz-5.0.3.tar.bz2解压工具,然后编译安装

tar -xf xz-5.0.3.tar

cd xz-5.0.3

./configure

make

make install

这样就可以用xz命令来解压tar.xz格式文件,

  1. xz -d linux-3.1-rc4.tar.xz
  2. tar -xvf linux-3.1-rc4.tar

复制代码

这里是下载了linux的内核源码,可以明显的看到tar.xz只有几十M大小,而解压后是几百兆的,这个确实压缩比率很高的。



附帮助:

jonesduan-MacBook-Pro:Linux_Kernel_Release user$ xz --help
Usage: xz [OPTION]... [FILE]...
Compress or decompress FILEs in the .xz format. -z, --compress force compression
-d, --decompress force decompression
-t, --test test compressed file integrity
-l, --list list information about .xz files
-k, --keep keep (don't delete) input files
-f, --force force overwrite of output file and (de)compress links
-c, --stdout write to standard output and don't delete input files
-0 ... -9 compression preset; default is 6; take compressor *and*
decompressor memory usage into account before using 7-9!
-e, --extreme try to improve compression ratio by using more CPU time;
does not affect decompressor memory requirements
-q, --quiet suppress warnings; specify twice to suppress errors too
-v, --verbose be verbose; specify twice for even more verbose
-h, --help display this short help and exit
-H, --long-help display the long help (lists also the advanced options)
-V, --version display the version number and exit With no FILE, or when FILE is -, read standard input. Report bugs to <lasse.collin@tukaani.org> (in English or Finnish).
XZ Utils home page: <http://tukaani.org/xz/>
jonesduan-MacBook-Pro:Linux_Kernel_Release user$

*.tar.bz2:

打包:tar -jcvf test.tar.bz2 test/

解包:tar -jxvf test.tar.bz2



*.tar.gz:

打包:tar -zcvf test.tar.gz test/

解包:tar -zxvf test.tar.gz



*.tar:

打包:tar -cvf test.tar test/

解包:tar -xvf test.tar



*.tar.xz:

打包:xz -z test.tar // 会将test.tar压缩为test.tar.xz,并删除原始test.tar文件

解包:xz -d test.tar.xz // 会将test.tar.xz解压为test.tar,并删除原始test.tar.xz文件

Mac OS X 10.8.4下面XZ Utils(*.tar.xz)压缩解压缩命令工具的安装的更多相关文章

  1. 【转】windows环境下安装win8.1+Mac OS X 10.10双系统教程

    先要感谢远景论坛里的各位大神们的帖子  没有他们的分享我也不能顺利的装上Mac OS X 10.10! 写这篇随笔主要是为了防止自己遗忘,同时给大家分享下我的经验. 本教程适用于BIOS+MBR分区的 ...

  2. VMWare 安装 Mac OS X10.10 Yosemite

    OS X Yosemite 新功能特性 Mac OS X10.10 GM3|OS X 10.10 Yosemite 正式版下载 如何在虚拟机中安装苹果mac系统图示说明 vm10虚拟机安装Mac OS ...

  3. [MAC]用beamoff给VMware的Mac OS X 10.10.x加速

    MAC OS X 10.10.x Yosemite在VMWare中实在是太慢了,卡出翔!好在高人多,请装beamoff!详见:https://github.com/JasF/beamoff.git C ...

  4. windows环境下安装win8.1+Mac OS X 10.10双系统教程

    首先要感谢远景论坛里的各位大神们的帖子  没有他们的分享我也不能顺利的装上Mac OS X 10.10! 写这篇随笔主要是为了防止自己遗忘,同时给大家分享下我的经验. 本教程适用于BIOS+MBR分区 ...

  5. vm10虚拟机安装Mac OS X10.10教程[转]

    update:http://www.sysprobs.com/vmware-workstation-8-0-8-0-1-unlocker-to-run-mac-os-x-guest-in-window ...

  6. Windows下虚拟机安装Mac OS X ----- VM12安装Mac OS X 10.11

    Windows下虚拟机安装Mac OS X -– VM12安装Mac OS X 10.11 随着Iphone在国内大行其道,越来越多的开发者涌入iOS开发大军 中,但都苦于没有苹果机,本文即将介绍WI ...

  7. Mac OS X 10.9 Mavericks安装后,Xcode调试时模拟器黑屏的处理方法

    请耐心的等下去吧,少年! 装了Mac OS X 10.9 Mavericks的同学,如果碰到Xcode调试App时,模拟器黑屏(重置也无效),请耐心的等下去吧,大约10来分钟左右黑屏就会消失,App启 ...

  8. 在Mac OS X 10.8中配置Apache + PHP + MySQL

    在Mac OS X 10.8中配置Apache+PHP+MySQL的内容包括: 配置Apache 配置PHP 安装MySQL 配置PHPAdmin 设置数据库默认字符集 一. 配置Apache 1. ...

  9. Vmware 10安装MAC OS X 10.9备忘

    下载准备     Vmware 10     unlock-all-v120.zip (用以支持新建MAC)     MAC OS X 10.9 VMWARE.rar 已经安装完成的MAC系统虚拟机镜 ...

随机推荐

  1. 自写JQ控件-树状菜单控件[demo下载]

    一个多月没有写博客了,最近也弄一个基于JQ的树状菜单控件,在此分享给大家.另外呢,通过这个例子分享一下怎么写JQ控件的. 事实上工作中,也是经常遇到的,有些时候自己想实现一些前端效果,用网上一些插件吧 ...

  2. oracle11实战详解

    因为最近可以学习oracle了,所以昨天把oracle装好了,装的时候因为种种不知名的原因,把我的mysql居然连连不上了.说实话如果自己看教程安装的话还是有一点小复杂的,特别是对于我这种学渣来说,我 ...

  3. 使用redis构建文章投票系统

    首先,我得说明这篇博客基本上就是<<redis in action>>第一章内容的读书笔记. 需求 首先,说明一下,我们的需求 用户可以发表文章,发表时,自己就默认的给自己的文 ...

  4. RAP在线接口管理统计部署

    文档: https://github.com/thx/RAP/wiki/home_cn centos上部署 参考:https://github.com/thx/RAP/wiki/deploy_on_c ...

  5. C++ 中const作用

    一.对const与#define的特点及区别的理解 #define只是用来做文本替换的,#define常量的生命周期止于编译期,它存在于程序的代码段,在实际程序中它只是一个常数,一个命令中的参数,并没 ...

  6. OpenCV, MatBGR2ARGB, ARGB2MatBGR

    代码片段~ unsigned int* abMatBGR2ARGB(Mat imag) { int nCols; int nRows; unsigned int *pbuff = NULL; if(i ...

  7. 凸函数与Jensen不等式

    这个是在凸优化里面看的,在EM算法中看有用到,所以用latex写了篇回忆用的小短文,现在不会把latex产生的pdf怎么转变成放到这里的内容. 所以我选择直接贴图. 这个pdf可以在我的资源里找到.  ...

  8. Spark运行架构

    http://blog.csdn.net/pipisorry/article/details/52366288 1. Spark运行架构 1.1 术语定义 lApplication:Spark App ...

  9. Erlang application stop 调用死锁

    Erlang application stop 调用死锁(金庆的专栏)在application行为模块的start()中启动bson应用,在stop()中停止bson,结果application:st ...

  10. Android Studio基本配置

    主题设置 File→Settings- 添加第三方主题 网址:http://www.ideacolorthemes.org/home/ File→Import Settings- 设置控制台字体大小 ...