I know how to gunzip
a file to a selected location.
But when it comes to utilizing all CPU power, many consider pigz
instead of gzip
. So, the question is how do I unpigz
(and untar) a *.tar.gz file to a specific directory?
compressiongzipmultithreadingtar
I know how to gunzip
a file to a selected location.
But when it comes to utilizing all CPU power, many consider pigz
instead of gzip
. So, the question is how do I unpigz
(and untar) a *.tar.gz file to a specific directory?
Best Answer
I found three solutions:
With GNU
tar
, using the awesome-I
option:With a lot of Linux piping (a "geek way"):
More portable (to other
tar
implementations):(You can also replace
tar xvf -
withpax -r
to make it POSIX-compliant, though not necessarily more portable on Linux-based systems.)Credits go to @PSkocik for a proper direction, @Stéphane Chazelas for the 3rd variant and to the author of this answer.