Issue
Im using the following command(s):
GZIP=-9 tar -cf test9 directory
GZIP=-5 tar -cf test5 directory
GZIP=-2 tar -cf test2 directory
all test* result is the same, looks like compression level was ignored. How to get it into account?
Solution
You need to use the 'z' option to enable gzip compression, which then gave me the warning "gzip: warning: GZIP environment variable is deprecated; use an alias or script" with GZIP environment variable set.
I would use this syntax:
tar cf - directory | gzip -9 > test9.tar.gz
and just learned that you can also do:
tar cf test9 -I 'gzip -9' directory
``
Answered By - Allan Wind Answer Checked By - Mildred Charles (WPSolving Admin)