在linux下怎么解压和压缩tar.xz文件? (本文由www.169it.com搜集整理)

在linux下解压tar.xz文件步骤

1
2
# xz -d ***.tar.xz  //先解压xz
# tar -xvf  ***.tar //再解压tar

tar.xz压缩包也是打包后再压缩,外面是xz压缩方式,里层是tar打包方式。

在linux下创建tar.xz文件步骤

1
2
# tar cvf xxx.tar xxx  // 这样创建xxx.tar文件先,
# xz -z xxx.tar        //将 xxx.tar压缩成为 xxx.tar.xz

Windows下如何解压tar.xz文件?

下载最新版本的7-zip软件即可解压tar.xz文件。

xz是大多数linux默认自带的一个压缩工具,xz 解压命令格式如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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

xz压缩文件方法或命令

xz -z 要压缩的文件

如果要保留被压缩的文件加上参数 -k ,如果要设置压缩率加入参数 -0 到 -9调节压缩率。如果不设置,默认压缩等级是6.

如没有按照xz工具,则首先需要下载、安装xz工具:

 xz下载

xz安装步骤:

1
2
3
4
5
  1、tar -jxvf xz-4.999.9beta.tar.bz2
  2、cd xz-4.999.9beta
  3、./configure --prefix=/
  4、make
  5、make install

7-zip介绍

7-Zip 软件基于 GNU 次要公共许可协议(Lesser General Public License) 之下发布,是一款完全免费的压缩解压软件。7-Zip是一款免费开源的解压缩软件,命令行选项具有强大的设置功能,非常适合用来备份,将介绍如何操作。将使用没有图形界面的7-Zip,操作通过命令行完成。这样做的好处之一就是整个软件的程序只有一个文件,适合在U盘中随身携带,易于操作。

7-zip最新版下载地址:

  2014年最新7-Zip 9.20 稳定版下载

7-Zip 主要特征

使用了 LZMA 与 LZMA2 算法的 7z 格式 拥有极高的压缩比

支持格式:

压缩 / 解压缩:7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM。

仅解压缩:ARJ, CAB, CHM, CPIO, CramFS, DEB, DMG, FAT, HFS, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, RAR, RPM, SquashFS, UDF, VHD, WIM, XAR, Z。

对于 ZIP 及 GZIP 格式,7-Zip 能提供比使用 PKZip 及 WinZip 高 2-10% 的压缩比。

为 7z 与 ZIP 提供更完善的 AES-256 加密算法。

7z 格式支持创建自释放压缩包。

Windows 资源管理器集成。

强大的的文件管理器。

更给力的命令行版本。

支持 FAR Manager 插件。

支持 79 种语言。

7-zip在windows下支持直接解压tar.xz压缩文件。

摘自:http://www.169it.com/article/9024845268002546255.html

tar.xz如何解压:linux和windows下tar.xz解压命令介绍的更多相关文章

  1. RPM方式安装MySQL5.6和windows下安装mysql解压版

    下载地址: http://cdn.MySQL.com/archives/mysql-5.6/MySQL-server-5.6.13-1.el6.x86_64.rpmhttp://cdn.mysql.c ...

  2. MySQL5.7.25(解压版)Windows下详细的安装过程

    大家好,我是浅墨竹染,以下是MySQL5.7.25(解压版)Windows下详细的安装过程 1.首先下载MySQL 推荐去官网上下载MySQL,如果不想找,那么下面就是: Windows32位地址:点 ...

  3. (一)windows下安装MongoDB解压版

    windows下安装MongoDB解压版 我安装的是(mongodb-win32-x86_64-2008plus-ssl-4.0.8.zip)版本 亲测可以使用. 连接: Windows下MongoD ...

  4. 【转】linux和windows下安装python集成开发环境及其python包

    本系列分为两篇: 1.[转]windows和linux中搭建python集成开发环境IDE 2.[转]linux和windows下安装python集成开发环境及其python包 3.windows和l ...

  5. Python调用windows下DLL详解

    Python调用windows下DLL详解 - ctypes库的使用 2014年09月05日 16:05:44 阅读数:6942 在python中某些时候需要C做效率上的补充,在实际应用中,需要做部分 ...

  6. 从Docker在Linux和Windows下的区别简单理解Docker的层次结构

    上篇文章我们成功在Windows下安装了Docker,输出了一个简单的Hello World程序.本文中我们将利用Docker已有的云端镜像training/webapp来发布一个简单Python的W ...

  7. [笔记]linux下和windows下的 创建线程函数

    linux下和windows下的 创建线程函数 #ifdef __GNUC__ //Linux #include <pthread.h> #define CreateThreadEx(ti ...

  8. protobuff 配合 libevent 在Linux 和windows 下的使用

    protobuff 配合 libevent 在Linux 和windows 下的使用待补全. libprotobuf.lib libproto-lite.lib libprotoc.lib

  9. Linux和Windows下查看环境变量方法对比

    摘自:Linux和Windows下查看环境变量方法对比 一.查看所有环境变量的名称和值 Linux下:export Windows下:set 二.根据名称查该环境变量的值 Linux下:echo $环 ...

随机推荐

  1. zoj 1648 判断线段是否相交

    链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=648 Circuit Board Time Limit: 2 Second ...

  2. run a Freight robot (3)

    5.Logging In Once the robot is turned on and the robot is on the network, ssh into the computer of t ...

  3. jQuery 中$(this).parent().parent().remove()无效。

    在写文章系统的删除功能.需要删除一行数据.在删除的页面,需要jQuery 删除一hang. 局部刷新数据. $(".del").click(function(){ var id = ...

  4. ubuntu 卸载/安装 redis

    ubuntu 卸载redis 1. 卸载软件 apt-get remove redis 2. 清除配置 apt-get remove --purge redis 3. 删除残留文件 find / -n ...

  5. jQuery调用AJAX异步详解[转]

    AJAX 全称 Asynchronous JavaScript and XML(异步的 JavaScript 和 XML).它并非一种新的技术,而是以下几种原有技术的结合体. 1)   使用CSS和X ...

  6. Android ActionBar以及menu的代码设置样式

    menu部分xml代码 <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android= ...

  7. Nginx基础知识之————什么是 Nginx?

    本课时主要给大家讲解什么是 Nginx 和 Nginx 的功能,Nginx 与其他服务器的性能比较和 Nginx 的优点总结的知识,并结合实例让学员深入理解 Nginx 和 Nginx 的功能以及 N ...

  8. 树的计数 + prufer序列与Cayley公式 学习笔记

    首先是 Martrix67 的博文:http://www.matrix67.com/blog/archives/682 然后是morejarphone同学的博文:http://blog.csdn.ne ...

  9. (转)jQuery轻量级响应式图片轮播插件ResponsiveSlides.js(仅1kb)也可以做纯文本轮播

    ResponsiveSlides.js是一个展示同一容器内图片的轻量级响应式jQuery幻灯片插件(tiny responsive slideshow jQuery plugin).它支持包括IE6在 ...

  10. maven的聚合与继承5

    一.聚合 如果我们想一次构建多个项目模块,那我们就需要对多个项目模块进行聚合 1.1.聚合配置代码 1 <modules> 2 <module>模块一</module&g ...