I wanted to see whether 2 directories are identical in terms of content. So what I did was tar the directories and then md5sum-ed them and then compare but the hashes were not identical. I tried to go inside each directory and md5sum-ed each file of each directory and compared individually and then each file in the different directory seemed to have the same hash. Then I checked with the tars and then tars of different directories didn't match (by using diff). So now that is causing md5sum to not match. But then why would that happen? So now which one is wrong - tar or md5sum?