linux 中文件利用管道进行压缩输出
1、
root@DESKTOP-1N42TVH:/home/test# ls outcome.map root@DESKTOP-1N42TVH:/home/test# wc -l outcome.map ## 测试文件 46827 outcome.map root@DESKTOP-1N42TVH:/home/test# head -n 10 outcome.map | gzip > xxx.map.gz ## 文件的压缩输出 root@DESKTOP-1N42TVH:/home/test# ls outcome.map xxx.map.gz root@DESKTOP-1N42TVH:/home/test# gzip -dc xxx.map.gz > xxx.map ## 解压缩并保留原始文件 root@DESKTOP-1N42TVH:/home/test# ls outcome.map xxx.map xxx.map.gz root@DESKTOP-1N42TVH:/home/test# cat xxx.map ## 解压后查看结果 1 s64199.1 0 55910 1 OAR19_64675012.1 0 85204 1 OAR19_64715327.1 0 122948 1 OAR19_64803054.1 0 203750 1 DU281551_498.1 0 312707 1 s18939.1 0 356863 1 OAR1_88143.1 0 400518 1 s09912.1 0 487423 1 s36301.1 0 578716 1 s34880.1 0 639876