Questions tagged [diff]

diff is a shell command to find differences between two files. It is common on all *nix based systems

In computing, diff is a file comparison utility that outputs the differences between two files. It is typically used to show the changes between one version of a file and a former version of the same file.
Diff displays the changes made per line for text files.

The output is called a "diff", or a patch, since the output can be applied with the Unix program patch. The output of similar file comparison utilities are also called a "diff".

(source)

Type man diff in a shell to get full documentation.

292 questions
31
votes
7 answers

Prevent diff from checking for newline at end of file

I have two big trees, which I want to compare. Some of the files in the tree differ just because one has newline at the end, and the other file lacks this newline. I want to ignore this fact. I have tried calling diff like this: diff…
blueFast
  • 2,716
20
votes
4 answers

How to ignore moved lines in a diff

I am currently working on a source code generation tool. To make sure that my changes do no introduce any new bugs, a diff between the output of the program before and after my changes would theoretically be a valuable tool. However, this turns out…
12
votes
4 answers

Tool for comparing a single line of text

Is there a tool for comparing two lines of text? All the tools I have compare on a line level, when I really need a character level diff in the line. Windows or *nix, GUI or command line, I don't care.
C. Ross
  • 6,344
10
votes
3 answers

Is there any graphical display tool for diff output?

I would like to post-process diff output and then pass the results to a graphical viewer, such as kdiff3 or xxdiff. If possible, I would like to be able to highlight in-line differences using different colors.
7
votes
3 answers

diff for multiple files

I use "diff -y" command to compare 2 results of different versions of my program line by line. Like this: 1 1 123 | 234 asdf | qerq Is there analog for multiple files, which will allow to compare line by line 3 or 4 files?Like this: 1 1 …
klm123
  • 333
6
votes
2 answers

"diff" terabyte files

Are there any tools that allow to "diff" text files of terabyte size?
Open the way
  • 8,613
5
votes
1 answer

Binary diff tool which would work the same way as diff(1) tool

Do you know Unix/Linux diff(1) tool works? It shows which lines were added and removed between 2 text files, and shows it in the human-readable form. I need the same kind of tool for binary files - except for working on sequences of bytes, not text…
pfalcon
  • 972
5
votes
4 answers

Checking whether binary files are the same?

Possible Duplicate: Binary Diff Tools On Windows What would be the easiest way of veryfying whether two binary files are the same, without actually opening them, checking versions and such in different programs ... ? I primary mean files like 3d…
Rook
  • 23,873
3
votes
2 answers

diff + print only string from the source file without extra information from the diff

When I perform diff between old to new files I get that DDDC string exsist in the old file by the sign "<" as the follwoing diff -w old new 103a104 > BBB 224c225 < DDDC But please advice if diff can display only the string DDDC from the old file…
jennifer
  • 1,117
2
votes
0 answers

Is it possible to view a tkdiff "report" in tkdiff?

tkdiff has an option to "Write Report" in the File menu, but I couldn't find any way to open the report in tkdiff later, i.e., so I can view the diff graphically again without having to recompute it.
Brian
  • 201
2
votes
3 answers

A tool to compare 2 folders and store the difference?

Does anybody knows a way to compare 2 versions of a directory to create a 3rd one with the difference of both? I need it to make incremental updates of my software. Thx
2
votes
2 answers

diff-so-fancy to compare files not under git version control

I really like the character-level highlighting of diff-so-fancy. How can I use it to compare files without using git?
Tom Hale
  • 2,410
1
vote
1 answer

How to mark files to manage the diff output

My collegues are maintaining a configuration file, which is deployed to production/test/staging environments by SaltStack. I am maintaining this file by using diff to see what has changed and code the appropriate jinja snippet. The file name is…
1
vote
1 answer

How can I compare a .zip's files to the non zip version?

I'm using 7-zip. I want to compare a huge backup Zip file (200GB) to the unzipped files. (I'm guessing the files are the same, but want to make sure without unzipping 200 GB) I've tried using Beyond Compare 3 but it claims the .zip files isn't…
Clay Nichols
  • 5,316
0
votes
2 answers

Merge two text files, with differences highlighted

I have two text files, which are almost the same except for some changes on a few lines. I would like to merge these two files into a single text file, with differences highlighted, so that I can then view the merged file on an editor and manually…
Juan A. Navarro
  • 243
  • 3
  • 8
1
2