4 examples for bzip2

{{ score }}
  # Unzip file.bz2, creating file, removing file.bz2. (See also bunzip2)
bzip2 -d file.bz2
        
{{ score }}
  # add file1, file2 and file3 to a tar, then compress them creating file4.tar.bz2
tar -cf file4.tar file1 file2 file3
bzip2 file4.tar
        
{{ score }}
  # Compress file, creating file.bz2, removing the old file
bzip2 file
        
{{ score }}
  # Create bzip2 archive from directory without intermediate files
tar -cjf output.tar.bz2 path/to/directory/