方法一:
壓縮:gzip ye.conf 或者 gzip -9 -c ye.conf > yeqing.conf.gz(最佳壓縮比例)
解壓:gzip -d ye.conf.gz
方法二:
隻打包不壓縮: tar -cf /tmp/ye.tar /application/tools
解壓:tar -xf /tmp/ye.tar
打包并壓縮: tar -zcf /tmp/qing.tar.gz /application/tools
解壓: tar -zxf /tmp/qing.tar.gz
打包并壓縮并保留屬性: tar -zcpf /tmp/yeqing.tar.gz /etc
本文轉自cloves 51CTO部落格,原文連結:http://blog.51cto.com/yeqing/1612856