diff - Command-line tool to display the differences between two files, or each corresponding file in two directories.

learn more… | top users | synonyms

14
votes
7answers
16k views

Which GUI diff viewer would you recommend?

I've hardly ever used anything other than Meld. Can you recommend anything else? It would be extra nice if you give a reason for your recommendation (as a Comment). [note] I want an alternative ...
5
votes
3answers
3k views

How do I “merge” two text files?

I recently upgraded from Ubuntu 12.04 to 12.10 and at one point, it encountered an Apache config file conflict in apache2.conf. I didn't give me a merge option at that point, so I just rejected the ...
10
votes
4answers
416 views

rolling diffs for storage of highly similar files?

At work we do a nightly dump of our mysql databases. From day to day, I would guestimate that close to 90-95% of the data is duplicate, increasing as time goes on. ( Heck at this point some are ...
6
votes
2answers
4k views

Diffing two big text files

I have two big files (6GB each). They are unsorted, with linefeeds (\n) as separators. How can I diff them? It should take under 24h.
13
votes
3answers
9k views

Comparing two files in Vim

Is it possible to view two files side-by-side in Vim? If so, how can I set up my editor to do this, and is there a way to diff between the two files within Vim? I am aware of the :next and :prev ...
11
votes
4answers
2k views

Converting colored output into html

There are tools providing coloured output: dwdiff -c File1 File2 # word level diff grep --color=always # we all know this guy ... The question is: How to convert their colored output of arbitrary ...
6
votes
1answer
427 views

Is there bdiff (1) in Linux?

There is bdiff(1) command in Solaris, which allow you to diff(1) files with size bigger than your RAM size (http://docs.oracle.com/cd/E19683-01/806-7612/files-23/index.html). Is there something like ...
5
votes
2answers
2k views

How do I save changed files?

I have two folders: ORIGINAL/ ORIGINAL_AND_MY_CHANGES/ My friend has a copy of ORIGINAL/. I would like to generate MY_CHANGES.tgz -- it should contain only new/changed files from ...
7
votes
2answers
588 views

Is there a condensed side-by-side diff format?

I have two log files with thousands of lines. After pre-processing, only some lines differ. These remaining lines are either real differences, or shuffled groups of lines. Unified diffs allow me to ...
2
votes
1answer
1k views

Diff the output of two `awk` commands

I'm trying to compute the difference between the output of two awk commands but my simple attempts at it seem to be failing. Here is what I'm trying: diff $(awk '{print $3}' f1.txt | sort -u) $(awk ...
5
votes
3answers
726 views

How do you compare two folders and copy the difference to a third folder?

You've got three folders: folder current, which contains your current files folder old, which contains an older version of the same files folder difference, which is just an empty folder How do ...
2
votes
1answer
1k views

Diff, show modified line from right file only

I have file a and b and I would like to output lines of b that changed since it was cloned from a. Just the modified lines, no surrounding context, no diff offset marks. How can I do that using shell ...
1
vote
1answer
375 views

Reading two files into an IFS while loop — Is there a way to get a zero diff result in this case?

I have a text file full of several hundred lines of sequences like this: b 29. b 52. c 84. c 83. c 94. c 93. c 61. b 38. c 81. c 92. c 28. c 37. ...