While I'm trying to decompress some bz2 installed from portage: ago@willoughby ~ $ file /usr/share/doc/ntp-4.2.6_p5-r10/README.bz2 /usr/share/doc/ntp-4.2.6_p5-r10/README.bz2: bzip2 compressed data, block size = 900k ago@willoughby ~ $ tar xjf /usr/share/doc/ntp-4.2.6_p5-r10/README.bz2 -C /tmp/ tar: This does not look like a tar archive tar: Skipping to next header tar: Exiting with failure status due to previous errors When I try to do it with another bz2 archive (it works): ago@willoughby ~ $ file /usr/portage/distfiles/akonadi-1.12.1.tar.bz2 /usr/portage/distfiles/akonadi-1.12.1.tar.bz2: bzip2 compressed data, block size = 900k ago@willoughby ~ $ tar xjf /usr/portage/distfiles/akonadi-1.12.1.tar.bz2 -C /tmp/ ago@willoughby ~ $ So, file confirms that the archives are the same, but tar is unable to decompress the bz2 installed by portage. Is it a bug or I am missing something?
(In reply to Agostino Sarubbo from comment #0) > While I'm trying to decompress some bz2 installed from portage: > > ago@willoughby ~ $ file /usr/share/doc/ntp-4.2.6_p5-r10/README.bz2 > /usr/share/doc/ntp-4.2.6_p5-r10/README.bz2: bzip2 compressed data, block > size = 900k > > ago@willoughby ~ $ tar xjf /usr/share/doc/ntp-4.2.6_p5-r10/README.bz2 -C > /tmp/ > tar: This does not look like a tar archive > tar: Skipping to next header > tar: Exiting with failure status due to previous errors You should use bzcat instead, because it's not a tar file.
tar doesn't unpack things that are not tar archives.