How to compare the content of a tarball with a folder

前端 未结 5 1382
旧时难觅i
旧时难觅i 2021-02-05 04:44

How can I compare a tar file (already compressed) of the original folder with the original folder?

First I created archive file using

tar -         


        
5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-05 05:14

    It should be --diff

    Try this (without the last directory_name):

    tar --diff -vf directory_name.zip
    

    The problem is that the --diff command only looks for differences on the existing files among the tar file and the folder. So, if a new file is added to the folder, the diff command does not report this.

提交回复
热议问题