How to compare the content of a tarball with a folder

前端 未结 5 1379
旧时难觅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条回答
  •  悲&欢浪女
    2021-02-05 05:34

    I've added to @zzeroo answer as I found that the times and user were all changed, as well as file permissions.

    tar --compare --file=archive-file.tar -C /some/where/ | awk '!'Mode/ && !/Uid/ && !/Gid/ && !/time/'
    

    That should output only the true differences between the tar and the directory /some/where/

提交回复
热议问题