1. linux 下的常用压缩工具
lzma: tar cvf /tmp/platinum.tar.lzma /etc --lzma
解压:
gzip: tar xvf platinum.tar.gz --gzip
bzip2: tar xvf platinum.tar.bz2 --bzip2
lzma: tar xvf platinum.tar.lzma --lzma
(1)这里只涉及五种压缩工具:
gzip,zip,bzip2,lzma,compress.
(2)
tar + gzip/bzip2/lzma 用法:
压缩:
gzip: tar cvf /tmp/platinum.tar.gz /etc --gzip
bzip2: tar cvf /tmp/platinum.tar.bz2 /etc --bzip2lzma: tar cvf /tmp/platinum.tar.lzma /etc --lzma
解压:
gzip: tar xvf platinum.tar.gz --gzip
bzip2: tar xvf platinum.tar.bz2 --bzip2
lzma: tar xvf platinum.tar.lzma --lzma
2. 比较以上几种工具
其实已经有牛人做了详细的比较,如下图。我也简单的验证了这里的比较结果。
(下图来源于:
http://blog.terzza.com/linux-compression-comparison-gzip-vs-bzip2-vs-lzma-vs-zip-vs-compress/)
(1)压缩比
(2)压缩速度
(3)解压缩速度
(4)结论:
If you need heavy compression and are willing to wait for it, use LZMA. If you want to squash things a little, but don’t have much time, GZIP and ZIP will work just fine.
<--文章完-->
本文深入探讨了Linux下的五种压缩工具:GZIP、ZIP、BZIP2、LZMA与COMPRESSION,通过实例演示了它们的使用方法,并对这五种工具进行了全面比较,包括压缩比、压缩速度与解压缩速度,最终得出使用建议。
1907

被折叠的 条评论
为什么被折叠?



