home | list info | list archive | date index | thread index

[OCLUG-Tech] tarball differences

In preparing a backup script for my server, I wanted to tar a directory, e.g.,

  tar czvf mydir.tar.gz /path-to-mydir/

and compare it with the "last" versions e.g., last/mydir.tar.gz

Even when no changes made, if I do

  cmp mydir.tar.gz last/mydir.tar.gz

I get

  mydir.tar.gz last/mydir.tar.gz differ: byte 5, line 1

This doesn't happen with zip, so I have a "sort of" workaround. However, I'm curious to
the origin of the issue if anyone has ideas.