Wiki‎ > ‎

Cat concatenate gz files

posted Oct 26, 2017, 1:30 PM by Dong Xu   [ updated Oct 26, 2017, 1:30 PM ]
https://www.biostars.org/p/81924/

cat file1.gz file2.gz file3.gz > allfiles-cat.gz

zcat file1.gz file2.gz file3.gz | gzip -c > allfiles-zcat.gz

zcat allfiles-cat.gz | md5sum

zcat allfiles-zcat.gz | md5sum

My experience is that the zcat method is around 40x slower, but the
resulting hash/message digests should be identical.
cat method's resulting file is a few percent bigger depending on your

the gzip parameters used in the methods.  


Comments