tar.xz如何解压:linux和windows下tar.xz解压命令介绍

简介:

在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压缩文件。

  • 169IT站内文章除注明原创外,均为转载,整理或搜集自网络.欢迎任何形式的转载,转载请注明出处.
    转载请注明:文章转载自:[169IT-最新最全的IT资讯]


本文转自茄子_2008博客园博客,原文链接:http://www.cnblogs.com/xd502djj/p/4686534.html,如需转载请自行联系原作者。


目录
相关文章
|
8天前
|
安全 Linux 网络安全
Metasploit Pro 4.22.8-2025091701 (Linux, Windows) - 专业渗透测试框架
Metasploit Pro 4.22.8-2025091701 (Linux, Windows) - 专业渗透测试框架
93 2
Metasploit Pro 4.22.8-2025091701 (Linux, Windows) - 专业渗透测试框架
|
8天前
|
JSON 安全 Linux
Nexpose 8.22.0 for Linux & Windows - 漏洞扫描
Nexpose 8.22.0 for Linux & Windows - 漏洞扫描
55 1
Nexpose 8.22.0 for Linux & Windows - 漏洞扫描
|
8天前
|
Linux 网络安全 iOS开发
Metasploit Framework 6.4.90 (macOS, Linux, Windows) - 开源渗透测试框架
Metasploit Framework 6.4.90 (macOS, Linux, Windows) - 开源渗透测试框架
138 1
Metasploit Framework 6.4.90 (macOS, Linux, Windows) - 开源渗透测试框架
|
10天前
|
NoSQL IDE MongoDB
Studio 3T 2025.17 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
Studio 3T 2025.17 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
75 1
Studio 3T 2025.17 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
|
13天前
|
安全 Ubuntu Linux
Nexpose 8.21.0 for Linux & Windows - 漏洞扫描
Nexpose 8.21.0 for Linux & Windows - 漏洞扫描
81 4
Nexpose 8.21.0 for Linux & Windows - 漏洞扫描
|
10天前
|
安全 Linux 网络安全
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
39 0
Nipper 3.9.0 for Windows & Linux - 网络设备漏洞评估
|
10天前
|
安全 Linux iOS开发
SonarQube Server 2025 Release 5 (macOS, Linux, Windows) - 代码质量、安全与静态分析工具
SonarQube Server 2025 Release 5 (macOS, Linux, Windows) - 代码质量、安全与静态分析工具
76 0
SonarQube Server 2025 Release 5 (macOS, Linux, Windows) - 代码质量、安全与静态分析工具
|
10天前
|
安全 Linux iOS开发
Tenable Nessus 10.10 (macOS, Linux, Windows) - 漏洞评估解决方案
Tenable Nessus 10.10 (macOS, Linux, Windows) - 漏洞评估解决方案
94 0
Tenable Nessus 10.10 (macOS, Linux, Windows) - 漏洞评估解决方案
|
26天前
|
Unix Linux 程序员
Linux文本搜索工具grep命令使用指南
以上就是对Linux环境下强大工具 `grep` 的基础到进阶功能介绍。它不仅能够执行简单文字查询任务还能够处理复杂文字处理任务,并且支持强大而灵活地正则表达规范来增加查询精度与效率。无论您是程序员、数据分析师还是系统管理员,在日常工作中熟练运用该命令都将极大提升您处理和分析数据效率。
103 16
|
2月前
|
NoSQL IDE MongoDB
Studio 3T 2025.15 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
Studio 3T 2025.15 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端
84 1
Studio 3T 2025.15 (macOS, Linux, Windows) - MongoDB 的终极 GUI、IDE 和 客户端