How to compare two tarball's content

后端 未结 11 840
北海茫月
北海茫月 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 15:54

    If not extracting the archives nor needing the differences, try diff's -q option:

    diff -q 1.tar 2.tar

    This quiet result will be "1.tar 2.tar differ" or nothing, if no differences.

提交回复
热议问题