I observe that when I use PIGZ version, generated tar file's md5sum hash is different than the next one generated.
Instead of PIGZ=-n if I use GZIP=-n generated hashes are same. I have followed following answer for
Tar produces different files each time
[1].
$ find sourceCode -print0 | LC_ALL=C sort -z | PIGZ=-n tar \
--mode=a+rwX --owner=0 --group=0 --absolute-names --no-recursion --null -T - -zcvf file.tar.gz
$ md5sum file.tar.gz # some hash is generated
# When I apply the same operation above output for md5sum file.tar.gz is different
=> Is this a normal case? or is it possible to have same behavior for PIGZ like GZIP?
ACCEPTED]
If you want tar to use pigz, you need to ask it to do so:
... | PIGZ=-n tar -Ipigz --mode=a+rwX --owner=0 --group=0 --absolute-names --no-recursion --null -T - -cvf file.tar.gz
With the -Ipigz option, and without -z, tar uses pigz and the PIGZ variable is taken into account. This results in tarballs with the same contents as gzip-compressed archives with GZIP=-n.
--mode=a+rwX --owner=0 --group=0 --absolute-namesparametes in addition to your answer ontar produces different files each time.- alper