Copyright (C) 2000-2012 |
GNU Info (tar.info)compareComparing Archive Members with the File System ---------------------------------------------- _(This message will disappear, once this node revised.)_ The `--compare' (`-d'), or `--diff' operation compares specified archive members against files with the same names, and then reports differences in file size, mode, owner, modification date and contents. You should _only_ specify archive member names, not file names. If you do not name any members, then `tar' will compare the entire archive. If a file is represented in the archive but does not exist in the file system, `tar' reports a difference. You have to specify the record size of the archive when modifying an archive with a non-default record size. `tar' ignores files in the file system that do not have corresponding members in the archive. The following example compares the archive members `rock', `blues' and `funk' in the archive `bluesrock.tar' with files of the same name in the file system. (Note that there is no file, `funk'; `tar' will report an error message.) $ tar --compare --file=bluesrock.tar rock blues funk rock blues tar: funk not found in archive Depending on the system where you are running `tar' and the version you are running, `tar' may have a different error message, such as: funk: does not exist The spirit behind the `--compare' (`--diff', `-d') option is to check whether the archive represents the current state of files on disk, more than validating the integrity of the archive media. For this later goal, Note: verify. automatically generated by info2www version 1.2.2.9 |