In Linux using gzip to compress files

After the original file named file1.txt, after the disappearance of the original file compression, compressed file called file1.txt.gz

gzip file1.txt

 

The compression process, to retain the original file

gzip -k file1.txt

 

Compress two files into one file

cat file1.txt file2.txt | gzip > foo.gz 或  gzip -c file1.txt file2.txt > foo.gz

 

References:

https://blog.csdn.net/qingsong3333/article/details/77462165

Guess you like

Origin www.cnblogs.com/bio-mary/p/11697173.html