I have four files that I created using an svndump


now when I run this

md5sum test2.svn test.svn test.svn.gz test2.svn.gz

Here is the output

89fc1d097345b0255825286d9b4d64c3  test2.svn
89fc1d097345b0255825286d9b4d64c3  test.svn
8284ebb8b4f860fbb3e03e63168b9c9e  test.svn.gz
ab9411efcb74a466ea8e6faea5c0af9d  test2.svn.gz

So I can't understand why gzip is compressing files differently is it putting a timestamp somewhere before compressing? I had a similar issue with mysqldump as it was using the date field on top

  • Dammit I just figured it out, but il let some one rack the points. Of you go answer :D
    – whoami
    Feb 6, 2012 at 11:22

2 Answers 2


gzip stores some of the original file's metadata in record header, including the file modification time and filename, if available. See GZIP file format specification.

So it's expected that your two gzip files aren't identical. You can work around this by passing gzip the -n flag, which stops it from including the original filename and timestamp in the header.


Every .gz file has an header with a name of file... Try head test.svn.gz and head test2.svn.gz

  • That outputs a whole lot of garbage. i don't thing head would work well on test.svn.gz
    – whoami
    Feb 6, 2012 at 12:01
  • In the begining you can see a name of file...
    – Jan Marek
    Feb 6, 2012 at 12:11
  • 1
    > head test2.svn.gz �����F�u���;��@�� h��'N`�V�D�?Fo�
    – whoami
    Feb 6, 2012 at 12:41
  • 12
    head test2.svn.gz|hexdump -C won't mess up your terminal
    – Mat
    Feb 6, 2012 at 12:45
  • ohhh nice @Mat love learning new commands
    – whoami
    Feb 6, 2012 at 12:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .