View tar.bz2 file content in Linux

tar.bz2 is a file format for bzip2-compressed tar archive. tar.bz2 files are normally small in size but require more CPU power to compress and extract as compared to tar.gz files.

To view the content of a tar.bz2 file without uncompressing, use tar with the tf options as follows;

$ tar tf filename.tar.bz2

The command will produce a list of files contained in the archive. Use less if the list is too long;

$ tar tf filename.tar.bz2 | less