I have two tar archives (compressed or not compressed), and I want to find all differences in the two archives. Both archives contain a complete file system (i.e. when unpacked, would generate directories like /bin, /home, /root, /usr, /var, /etc,... I hope you get the point). I want to have a list of the following:
I cannot just unpack those archives and use diff, as diff will not correctly recognize absolute symlinks (as they would point out of the file system structure of the archive).
Is there another way to compare the content of two tar archives?
The best I can think of is to use:
tar -tvf archive.tar
to list the contents of the file.
Something like:
tar -tvf archive1.tar > list1
tar -tvf archive2.tar > list2
diff list1 list2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With