DEV Community

Roy
Roy

Posted on

Why do the md5 hashes of two tarballs of the same file differ?

I can run:

echo "asdf" > testfile
tar czf a.tar.gz testfile
tar czf b.tar.gz testfile
md5sum *.tar.gz

and it turns out that a.tar.gz and b.tar.gz have different md5 hashes. It's true that they're different, which diff -u a.tar.gz b.tar.gz confirms.

What additional flags do I need to pass in to…

Top comments (0)