在压缩比率上: lzma>tar.bz2=bz>gzip=zip>tar (tar只打包不压缩)(tar.gz就是tgz也是gzip)
占用空间与压缩比率成反比
耗费时间与压缩比率成反比
从效率角度来说,当然是耗费时间越短越好
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.
PS:
压缩:
gzip: tar cvf /tmp/platinum.tar.gz /etc --gzip
bzip2: tar cvf /tmp/platinum.tar.bz2 /etc --bzip2
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
参数:
-C<目的目录>或–directory=<目的目录> 切换到指定的目录。
-v或–verbose 显示指令执行过程。
-f<备份文件>或–file=<备份文件> 指定备份文件。
-x或–extract或–get 从备份文件中还原文件。
-j使用zip压缩
–remove-files 文件加入备份文件后,就将其删除。