# 打包并压缩,其中-z代表打包后再使用gzip压缩
$ tar -czf applogs.tar.gz applogs/
# 解压到当前目录
$ tar -xzf applogs.tar.gz -C ./