I need to change the compression level for BZIP2 compression with tar. I found that we can set the compression level and run the tar command to compress. I tried different compression levels using the following command, but it seems like BZIP2=-<compression level>
does not change the compression level.
BZIP2=-1
tar -cjvf <output_file> <input_file>
How to do it correctly?
Since you tagged this "linux", I will assume that you are using GNU tar. Then you can give the compression command with options using
-I
: