So I am using pigz in tar with
tar --use-compress-program=pigz
and this works but it doesn't use all of my processors, and I'd like to make sure it's recursive (-r) and using (-9 compression level).
I read through Utilizing multi core for tar+gzip/bzip compression/decompression but it doesn't note anywhere to add additional commands in that format, and I couldn't find anything in the man page for either program for additional swithed.
Thanks, Cam
How to Compress Files with Pigz. To compress a single file to a zip format use the syntax. However, the command deletes the original file upon compression as you might have noticed. To retain the original file after compression, run use the -k option as shown.
Mark Adler's top voted answer on the SO link that you included in your question does provide a solution for specifying compression-level as well as number of processors to use:
tar cf - paths-to-archive | pigz -9 -p 32 > archive.tar.gz
See : https://stackoverflow.com/a/12320421
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With