How to compare the content of a tarball with a folder

--compare (-d) is more handy for that.

tar --compare --file=archive-file.tar

works if archive-file.tar is in the directory it was created. To compare archive-file.tar against a remote target (eg if you have moved archive-file.tar to /some/where/) use the -C parameter:

tar --compare --file=archive-file.tar -C /some/where/

If you want to see tar working, use -v without -v only errors (missing files/folders) are reported.

Tipp: This works with compressed tar.gz archives, too.

Leave a Comment