0

I'd like to visualize just file contents similar of two zip files.
For example:

arq1.txt has "The sky is blue"
arq2.txt has "The ocean is blue"

Apply zip command in both files (ar1.zip and ar2.zip).

After, I should run some command that show:
The words "The" and "is blue" are similar in both zip files.

2 Answers 2

0

Try "WinMerge" (it's free) to compare any 2 files. It has various options to compare 2 or more files - or even directories/folders. NB: Any search engine will find WinMerge for you.

I think you will always have to unzip the 2 files you need to compare first.

WinMerge uses 2-panes to show the contents of each file & highlights differences. It has many options to let you see just what you want. Please investigate them first.

I don't know of any program which can let you browse the contents of zip files and then compare 2 files from within each - which is what I think you'd like to do ..

Even if you can find such a program, it would still have to unzip the 2 files into a temporary area or folder first, though that would of course, save you some effort... & cleanup.

1
  • WinMerge is a excelent tool!! It is exactly I'm looking for!! Is there any tool like it for Linux platform?
    – Ricardo
    Commented May 26, 2014 at 16:14
0

The closest I could get is this:

diff -u <(echo "unzip -qc foo1.zip" ) <(echo "unzip -qc foo2.zip")

Given that file1.txt is inside foo1.zip and file2.txt is inside foo2.zip and file1.txt has "test is over" text and file2.txt has "war is over" text.

The output of the diff command shows the differences. I don't know how to see only the common parts... :/

--- /dev/fd/63 2014-05-26 19:59:47.572166557 +0300 +++ /dev/fd/62 2014-05-26 19:59:47.572166557 +0300 @@ -1 +1 @@ -test is over +war is over

If you could describe with more detail what you want, I can try to help you. :D

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .