tar: compare

1 
1 4.2.6 Comparing Archive Members with the File System
1 ----------------------------------------------------
1 
1 The '--compare' ('-d'), or '--diff' operation compares specified archive
1 members against files with the same names, and then reports differences
1 in file size, mode, owner, modification date and contents.  You should
1 _only_ specify archive member names, not file names.  If you do not name
1 any members, then 'tar' will compare the entire archive.  If a file is
1 represented in the archive but does not exist in the file system, 'tar'
1 reports a difference.
1 
1    You have to specify the record size of the archive when modifying an
1 archive with a non-default record size.
1 
1    'tar' ignores files in the file system that do not have corresponding
1 members in the archive.
1 
1    The following example compares the archive members 'rock', 'blues'
1 and 'funk' in the archive 'bluesrock.tar' with files of the same name in
1 the file system.  (Note that there is no file, 'funk'; 'tar' will report
1 an error message.)
1 
1      $ tar --compare --file=bluesrock.tar rock blues funk
1      rock
1      blues
1      tar: funk not found in archive
1 
1    The spirit behind the '--compare' ('--diff', '-d') option is to check
1 whether the archive represents the current state of files on disk, more
1 than validating the integrity of the archive media.  For this latter
1 goal, see ⇒verify.
1