Like the title says, how do I do this conversion from the Linux console?

up vote 8 down vote accepted

You can combine the two commands as following:

gunzip < file.gz | bzip2 > file.bz2

This will start two processes in parallel, gunzip reading the file.gz file and outputting the non-compressed stream to bizp2 to re-compress it into file.bz2.

This process does not create intermediate files, you'll need to remove the file.gz afterwards (rm file.gz).

  • Doesn't seem to work on Mac: No such file or directory for the new archive. – Peter Ilfrich Dec 20 '16 at 6:55

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.