Quantcast
Channel: 一言多いプログラマーの独り言
Viewing all articles
Browse latest Browse all 846

Ubuntuでデータ圧縮コマンド「XZ」

$
0
0
Ubuntuでデータ圧縮コマンド「XZ」です。
圧縮には時間がかかるものの、bzip2 を上回る圧縮率を誇り、高速に伸長できるという利点から、tar に採用されるなど、普及が進んでいます。
インストール

sudo apt-get install xz-utils liblzma-dev
ヘルプ

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.
使い方

# 圧縮
xz -k file.txt

解凍
xz -d file.txt.xz


参考サイト
XZ Utils の使い方(矢田晋さん)
逆引きUNIXコマンド/tar.xz形式ファイルを展開する(Linuxと過ごすさん)

Viewing all articles
Browse latest Browse all 846

Trending Articles