Combine two or more compressed files

Posted by shantanuo on Server Fault See other posts from Server Fault or by shantanuo
Published on 2012-06-27T04:39:09Z Indexed on 2012/06/27 9:17 UTC
Read the original article Hit count: 221

Filed under:
|

I have 2 gz files those I need to merge into one.

time join <(zcat r_TR2_2012-05-28-08-10-00.gz) <(zcat r_TR1_2012-05-28-08-10-00.gz)

The above statement is not working as expected. I am using 3 commands to do the needful.

gunzip r_TR2_2012-05-28-08-10-00.gz 
gunzip r_TR1_2012-05-28-08-10-00.gz 
tar -zcvf combined.tar.gz r_TR1_2012-05-28-08-10-00 r_TR2_2012-05-28-08-10-00 

Is there any way to do it in 1 statement?

© Server Fault or respective owner

Related posts about tar

Related posts about gzip