13

I'm new in Linux, is this conversion possible?

Do I need to compress and decompress all content?

3 Answers3

21
bunzip2 -c < file.tar.bz2 | gzip -c > file.tar.gz
Jeff Ferland
  • 863
  • 6
  • 12
6

You need to decompress, and then compress.

You can convert like so:

 bunzip2 -c -d file.tar.bz2 | gzip -v9 > file.tar.gz
0

Yes, you need to decompress and compress the content (because compression is not "compositional").