之前用gunzip时有时候会用到-9这个参数,但是不知道为什么,只知道使用就是了。
今天有看到了,果断忍不住了,还是查一下吧
通过man gunzip可以知道
-# --fast --best
Regulate the speed of compression using the specified digit #, where -1 or --fast indicates
the fastest compression method (less compression) and -9 or --best indicates the slowest com‐
pression method (best compression). The default compression level is -6 (that is, biased
towards high compression at expense of speed).
可以知道-9表示最慢的压缩最好的压缩效果
其他还可以-1 ~-9,估计分别表示压缩参数吧
最后留一个例子吧
dd if /dev/sda1 | gzip -9 > ./sda1.img
表示备份sda1分区并且压缩保存到镜像中
如果要恢复
gzip -dc ./sda1.img | dd of=/dev/sda1