在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安裝步驟:
|
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最新版下載地址:
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資訊]
本文標題:tar.xz如何解壓:linux和windows下tar.xz解壓命令介紹
