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

learn more… | top users | synonyms

1
vote
1answer
606 views

What is the difference between Context output format and Unicode output format while taking diff?

What is the difference between Context output format and Unicode output format when taking a diff? diff -NBur dir1/ dir2/ diff -NBcr dir1/ dir2/
4
votes
1answer
402 views

How to use diff tool to take a diff between directories with libraries and source?

I would like to know if i can use the diff tool to take the difference between two folders which contain sources as well as libraries and executable. Right now i gave diff -Naur dir1/ dir2/ ...
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 ...
4
votes
1answer
2k views

Recursively compare directory contents by name, ignoring file extensions

I have a directory containing about 7,000 music files. I used lame to recursively re-encode all files in it to a separate directory, outputting all files with the same relative path and file name. ...
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.
3
votes
1answer
2k views

What does 'patch unexpectedly ends in middle of line' mean?

This is the output of my patch command: Hunk #11 merged at 4184,4190. Hunk #12 merged at 4444. Hunk #13 merged at 4944. Hunk #14 NOT MERGED at 5106-5116. Hunk #15 merged at 5290. Hunk #16 merged at ...
13
votes
3answers
10k 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 ...
8
votes
5answers
7k views

Output the common lines (similarities) of two text files (the opposite of diff)?

Diff is a great tool to display the changes between two files. But how to display the similarities of two text files (while ignoring the differences)? I.e. sample input: a: Foo Bar X Hello World 42 ...
17
votes
4answers
6k views

Can't pipe into diff?

I wanted to be clever and compare a remote file to a local file without downloading it. I can get the contents of the remote file by ssh user@remote-host "cat path/file.name" However, piping that ...
10
votes
4answers
417 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 ...