Steve Youngs <youngs(a)xemacs.org> writes:
Personally, I blame GNU/tar. Try doing this:
tar cvzf test.tar.gz /some/directory/
md5sum test.tar.gz > test.md5
rm test.tar.gz
tar cvzf test.tar.gz /some/directory/
md5sum test.tar.gz >> test.md5
cat test.md5
The first fault in the reasoning is that you're actually using two
programs: tar and gzip. If I try the test like this:
tar cf x.tar test-dir
tar cf y.tar test-dir
...the resulting files are the same. However, if I do this:
tar czf x.tar.gz test-dir
tar czf y.tar.gz test-dir
...they differ.
The problem is that `gzip' "helpfully" adds a timestamp to the file,
even it is completely unneeded for TAR files which keep their own
timestamp information. Hopefully, there is a flag that removes this.
So if I try:
tar cf - test-dir | gzip -cn > x.tar.gz
tar cf - test-dir | gzip -cn > y.tar.gz
...the files are the same.
Does this work for you?