Sep 19, 2018

How to use bzip2 with tar

tar -cf file7.tar file4 file5 file6
bzip2 file7.tar
Alternatively, this can all be accomplished in a single step by merely adding the -j option to tar, which tells tar to compress the archive that it creates with bzip2. Thus, the above example would be simplified to:
tar -cjf file7.tar.bz2 file4 file5 file6