Difference between two .tar.gz file lists on linux

后端 未结 1 882
孤街浪徒
孤街浪徒 2020-12-24 02:45

Having two different .tar.gz files: The second .tar.gz is the subset of first .tar.gz.

I need a single line command to find the missing files in second .tar.gz.

相关标签:
1条回答
  • 2020-12-24 03:30

    Just list the contents and do diff:

    diff <(tar -tvf 1.tar.gz | sort) <(tar -tvf 2.tar.gz | sort)
    
    0 讨论(0)
提交回复
热议问题