[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Comparing the contents of .tar or .tar.gz files?



On Fri, 14 Jan 2005 16:14:51 GMT, Adam Funk <a24061@yahoo.com> wrote:
> In order to compare the contents of two archives, I've been doing
> this.
> 
> $ mkdir test-foo test-bar
> $ tar xzf foo.tar.gz -C test-foo
> $ tar xzf bar.tar.gz -C test-bar
> $ diff -r --brief test-foo test-bar
> ...
> 
> But is there a straightforward utility for comparing the contents of
> the files in two .tar or .tar.gz files without unpacking them?  (I'm
> not interested in comparing the timestamps or permissions of the
> archived files --- just the contents.)

Do "diff foo.tar bar.tar" or "zdiff foo.tar.gz bar.tar.gz" not do what
you want?  tar also has a "d" option for diffs, but that seems to
compare a tar file with what it would untar to.

-- 
Michael A. Marsh
http://www.umiacs.umd.edu/~mmarsh



Reply to: