常用压缩命令
1)zip 例如:zip filename.zip file1 file2
压缩后源文件存在
例如:生成800M的文件file1
[root@localhost ~]# dd if=/dev/zero of=file1 bs=100M count=8
验证:源文件800M,压缩后变成796k
unzip 解压缩:-d指定解压路径,不加解压在当前目录
2)gzip 例如:gzip messages
直接用源文件压缩,压缩后源文件不存在,默认后缀名:.gz
不解压查看压缩文件内容
解压也是直接用源压缩文件,解压缩后源压缩文件不存在
[root@localhost yun46]# gunzip messages.gz