Linux: January 2012 Archives

7zip for Linux

Vote 0 Votes

# wget
# tar jxf p7zip_9.20.1_x86_linux_bin.tar.bz2
# cd p7zip_9.20.1
# ./

壓縮語法 7z a archive.7z files
解壓縮語法 7z x archive.7z

7zip 優點: 高壓縮率, 缺點: 速率比較慢

7zip, tar.gz, tar.bz2, zip, rar 比一比

測試環境: CentOS release 5.5 x64

壓縮目錄: /etc (163MB)

time 7z a etc.7z etc > /dev/null
time tar czf etc.tar.gz etc > /dev/null
time tar cjf etc.tar.bz2 etc > /dev/null
time zip -ry etc > /dev/null # -y Store symbolic links as such in the zip archive)
time rar a -r -ol etc.rar etc > /dev/null # -ol Save symbolic links as the link instead of the file

7z 0m45.925s
tar.gz 0m4.964s
tar.bz2 0m36.247s
zip 0m4.943s
rar 0m18.034s
-rw-r--r-- 1 root root 8559891 1月 20 13:38 etc.7z
-rw-r--r-- 1 root root 12502767 1月 20 13:39 etc.rar
-rw-r--r-- 1 root root 10376397 1月 20 13:38 etc.tar.bz2
-rw-r--r-- 1 root root 16081599 1月 20 13:38 etc.tar.gz
-rw-r--r-- 1 root root 16592572 1月 20 13:39

壓縮速度(按壓縮時間短至長排列): zip > tar.gz > rar > tar.bz2 > 7z
壓縮率(按檔案小至大排列): 7z > tar.bz2 > rar > tar.gz > zip
速度快的壓縮率低, 壓縮率高的不快, 魚與熊掌不可兼得,
7zip 的壓縮率真的很出色! 幾乎是 zip 的一半大小

Recent Entries

About this Archive

This page is an archive of entries in the Linux category from January 2012.

Linux: December 2011 is the previous archive.

Linux: February 2012 is the next archive.

Find recent content on the main index or look in the archives to find all content.

Monthly Archives