Question

I am trying to use pigz for parallel compress and decompress. I have found a way to compress in parallel using the following command:

tar cf - /input/dir | pigz > output_file.tar.gz

What is the equivalent command to decompress? I need to be able to specify the filename and the output directory path in the command for it to be useful for me.

Was it helpful?

Solution

Use pigz -dc for decompression to stdout. Then use > as you are in your example to direct the output to the desired path and file.

You can type just pigz for command options help.

OTHER TIPS

You're probably looking for something along the lines of:

pigz -dc archive.tar.gz | tar xf -

but noting Mark Adler's (legendary, at this point) original post, pigz does not utilize multiple cores for decompression. However, it does utilize additional cores for reading, writing, and some additional calculations, which do yield a moderate performance increase over gzip. Enjoy!

tar -I pigz -xvf compressed_file.tar.gz

For some reason, pigz doesn't autocomplete ".gz" compressed files, but if you type the names of your files pigz finds them.

To decompress and keep your compressed files use: pigz -dk yourfilename.gz. If you don't need the compressed versions use just pigz -d yourfilename.gz.

pigz --help shows all the options available.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top