Search code examples
linuxzipcompressiontar

lbzip2 uncompress tar file


I compressed a folder with many subfolders ( about 50GB)

Compression:

tar -cjf test.tar.bz2 test

unzip:

lbzip2 -k -d -n 5 test.tar.bz2 ~/temp/

Why the output is a .tar file ? I'm searching on google but I'm confused I expect a uncompressed folder

Thank you


Solution

  • tar -xjf test.tar.bz2

    That will run bunzip2 to decompress and it will extract the contents of the tar file.

    If you feel the need to specifically use lbzip2 for decompression, then:

    lbzip2 -dc < test.tar.bz2 | tar xf -