I'm trying to make use of the --use-compress-program option of tar, to
use an alternative compression app when building my tarball. However,
I'm trying to find a way to pass parameters to the compression program,
but I don't see any way to do that.
The alternative compression program I'm calling, pigz (a parallelizable
version of gzip compression), has a parameter -p to control the number
of CPU's to use in the parallelization. But there doesn't seem to be
any way for me to pass that parameter from the tar command. For
example, the following command doesn't work:
[darose@daroselin code]$ tar --use-compress-program "pigz -p 2" -cf
/tmp/test.tar.pgz .
tar (child): pigz -p 2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
Anyone know how I might accomplish this?
Thanks,
DR