Last active
December 14, 2015 02:49
-
-
Save mark-rushakoff/5016519 to your computer and use it in GitHub Desktop.
Demonstration of how gzip seems to embed a timestamp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> echo 'Hello!' > hello.txt | |
> # Create 2 tarballs at right about the same time: | |
> tar czf hello1.tar.gz hello.txt; tar czf hello2.tar.gz hello.txt | |
> md5 * # The tarballs have the same md5 | |
MD5 (hello.txt) = e134ced312b3511d88943d57ccd70c83 | |
MD5 (hello1.tar.gz) = bfdacca1166009500d60151d73c4da7e | |
MD5 (hello2.tar.gz) = bfdacca1166009500d60151d73c4da7e | |
> tar czf hello1.tar.gz hello.txt; tar czf hello2.tar.gz hello.txt | |
> md5 * # The tarballs have a different md5 | |
MD5 (hello.txt) = e134ced312b3511d88943d57ccd70c83 | |
MD5 (hello1.tar.gz) = b24c11090c4d49d58a1a1860460fced6 | |
MD5 (hello2.tar.gz) = b24c11090c4d49d58a1a1860460fced6 | |
> tar czf hello1.tar.gz hello.txt; sleep 1; tar czf hello2.tar.gz hello.txt | |
> md5 * # The tarballs have different md5s when created 1 second apart | |
MD5 (hello.txt) = e134ced312b3511d88943d57ccd70c83 | |
MD5 (hello1.tar.gz) = 0b079bfb2f135c57c565c4e69ca6fbb3 | |
MD5 (hello2.tar.gz) = 893adf011b8191a35b91b166c94e9d7e | |
> tar cf hello1.tar hello.txt; sleep 1; tar cf hello2.tar hello.txt | |
> md5 *.tar # The tar files have the same md5sum despite being created a second apart | |
MD5 (hello1.tar) = 08184f46132e863d0255fbf784fcaf2b | |
MD5 (hello2.tar) = 08184f46132e863d0255fbf784fcaf2b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment