1

Is there are way to use utility like diff to find the difference in metadata of two identical file hierarchies? If I have two identical file structures like

root_folder/
    file1
    file2
    folder1/
        file3

The diff utility will usually exit as though they are identical but adding them to tarballs will produce different hashes. This indicates differences in metadata like timestamps, ownership, etc. but I would like to know what are the exact differences and the default behavior of diff doesn't help me there.

1

I highly recommend diffoscope in this sort of situation.

You can run it before creating the tarballs, as

diffoscope dir1 dir2

to find the differences between the two directories (including metadata), or after creating them, as

diffoscope tarball1.tar tarball2.tar

to find the differences between the two tarballs.

  • A good tool available on most platforms - thanks! – pevogam Jun 13 '18 at 14:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.