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.ta
a.ta
For MacOS:
In man tar we can look at --options section and there we will find !timestamp option, which will exclude timestamp from our gzip archive. Usage:
man tar
--options
!timestamp
tar --options '!timestamp' -cvzf archive.tgz filename
It will produce same md5 sum for same files with same names