5 ms·
Why use tar | pigz -0 when you can just use tar?
by anderskaseorg 4y ago
Why use tar | pigz -0 when you can just use tar?
- jaimehrubiks 4y agoI used tar --use-compress-program="pigz" to create the tar out of billions of files
- richard_todd 4y agoBut what’s confusing everyone is that tar cf - will create the tar without any external compression program needed.
- koolba 4y agoEven the “f -“ option is unneeded as the default is to stream to stdout. Though it’s always a bit scary to not explicitly specify the destination in case your finger slips and the first target is itself a writeable file.
- jaimehrubiks 4y agoI could definitely be wrong here, apologies for the confusion. I run many of these tasks automated, in some cases I used low compression, in others zero compression. For low compression, that command really shines, for zero compression, I would have bet I also got improvement over regular tar without compression, but again, I could be wrong here. I'll test it again
- ac29 4y agoTar is the archiver here (putting multiple files into one file), pigz with no compression isnt doing anything besides wasting CPU time.
- donatj 4y agoIf you're not going to compress at all, you don't need a compressor at all. All you needed was a .tar and not a .tar.gz