I want to compare the content of a tar archive (backup of $HOME
) with the content of my local $HOME
to see whether there are files in the tar file which are not yet in the local filesystem.
What is the best way to do that?
I tried tar -dvf archive.tar *
in $HOME
already but the output is not really satisfying. It says tar: Videos: Not found in archive
for some files and folders on the first directory level although they are in the archive and then it exits with tar: Exiting with failure status due to previous errors
(exit code 2).
EDIT: It's on Ubuntu 10.04 and I'm quite familiar with the bash.
Best Answer
Try this:
tar -dvf example.tar
(in the directory with which you're comparing)
The -d is the same as --diff / --compare
More info: http://www.apl.jhu.edu/Misc/Unix-info/tar/tar_16.html and http://ss64.com/bash/tar.html