Go to the previous, next section.
(This message will disappear, once this node revised.)
`--compare' (`-d') compares archive members in an existing archive
with their counterparts in the file system, and reports differences in
file size, mode, owner, modification date and contents. If a file is
represented in the archive but does not exist in the file system,
tar
reports a difference.
If you use file name arguments in conjunction with `tar
--compare', tar
compares the archived versions of the files
specified with their counterparts in the file system. If you specify
a file that is not in the archive, tar
will report an error. If
you don't specify any files, tar
compares all the files in the
archive.
Because tar
only checks files in the archive against files in
the file system, and not vice versa, it ignores files in the file
system that do not exist in the archive.
The following example compares the archive members `larry', `moe' and `curly' in the archive `stooges' with files of the same name in the file system.
tar --compare --file=stooges larry moe curly
If a file, for example `curly', did not exist in the archive,
tar
would report an error, as follows:
curly: does not exist
Go to the previous, next section.