How to compare two tarball's content

后端 未结 11 824
北海茫月
北海茫月 2021-01-31 15:18

I want to tell whether two tarball files contain identical files, in terms of file name and file content, not including meta-data like date, user, group.

However, There

11条回答
  •  孤独总比滥情好
    2021-01-31 16:17

    tarsum is almost what you need. Take its output, run it through sort to get the ordering identical on each, and then compare the two with diff. That should get you a basic implementation going, and it would be easily enough to pull those steps into the main program by modifying the Python code to do the whole job.

提交回复
热议问题