Diff

related topics
{system, computer, user}
{math, number, function}
{work, book, publish}
{language, word, form}
{mi², represent, 1st}
{style, bgcolor, rowspan}

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. Modern implementations also support binary files.[1] 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". Like the use of the word "grep" for describing the act of searching, the word diff is used in jargon as a verb for calculating any difference.

Contents

History

The diff utility was developed in the early 1970s on the Unix operating system which was emerging from AT&T Bell Labs in Murray Hill, New Jersey. The final version, first shipped with the 5th Edition of Unix in 1974, was entirely written by Douglas McIlroy. This research was published in a 1976 paper co-written with James W. Hunt who developed an initial prototype of diff.[2] The algorithm this paper described became known as the Hunt-McIlroy algorithm.

McIlroy's work was preceded and influenced by Steve Johnson's comparison program on GECOS and Mike Lesk's proof program. proof also originated on Unix and, like diff, produced line-by-line changes and even used angle-brackets (">" and "<") for presenting line insertions and deletions in the program's output. The heuristics used in these early applications were, however, deemed unreliable. The potential usefulness of a diff tool provoked McIlroy into researching and designing a more robust tool that could be used in a variety of tasks but perform well in the processing and size limitations of the PDP-11's hardware. His approach to the problem resulted from collaboration also with individuals at Bell Labs including Alfred Aho, Elliot Pinson, Jeffrey Ullman, and Harold S. Stone.

Full article ▸

related documents
Endianness
VHDL
Computer program
HyperCard
Very long instruction word
Subnetwork
Cocoa (API)
Domain Name System
Database
Visual Basic for Applications
Library (computing)
DNIX
Atari BASIC
Control theory
Thread (computer science)
XFS
AmigaDOS
Phase-shift keying
Anti-aliasing
Enigma machine
Verilog
ISO 9660
ASCII
Spanning tree protocol
GRASS (programming language)
Public-key cryptography
Fortran
Database management system
Data model
MUMPS