diff Tool
(Redirected from diff utility)
Jump to navigation
Jump to search
A diff Tool is a Linux-based command line file comparison tool.
- Context:
- It can (typically) produce output in several standard formats, including formats suitable for human interpretation and computer parsing.
- It can (often) operate line-oriented, focusing on lines rather than individual characters.
- It can (often) support both Text Files and Binary Files.
- It can (often) be used to show changes between two versions of the same file, highlighting additions, deletions, and modifications.
- It can (typically) conform to the POSIX standard, which specifies its behavior and output file formats.
- ...
- Example(s):
- GNU diff, which is part of a diffutils GNU package.
- BSD diff.
- MacOS diff.
- ...
- Counter-Example(s):
- See: Package Diff File, Patch (Unix).
References
2023
- (Wikipedia, 2023) ⇒ https://en.wikipedia.org/wiki/diff Retrieved:2023-1-6.
- In computing, the utility diff is a data comparison tool that computes and displays the differences between the contents of files. Unlike edit distance notions used for other purposes, diff is line-oriented rather than character-oriented, but it is like Levenshtein distance in that it tries to determine the smallest set of deletions and insertions to create one file from the other. The utility displays the changes in one of several standard formats, such that both humans or computers can parse the changes, and use them for patching.
Typically, diff is used to show the changes between two versions of the same file. 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 is also called a "diff"; like the use of the word “grep” for describing the act of searching, the word diff became a generic term for calculating data difference and the results thereof. [2] The POSIX standard specifies the behavior of the "diff" and "patch" utilities and their file formats. [3]
- In computing, the utility diff is a data comparison tool that computes and displays the differences between the contents of files. Unlike edit distance notions used for other purposes, diff is line-oriented rather than character-oriented, but it is like Levenshtein distance in that it tries to determine the smallest set of deletions and insertions to create one file from the other. The utility displays the changes in one of several standard formats, such that both humans or computers can parse the changes, and use them for patching.
- ↑ MacKenzie et al. "Binary Files and Forcing Text Comparison" in Comparing and Merging Files with GNU Diff and Patch. Downloaded 28 April 2007. [1]
- ↑ Eric S. Raymond (ed.), "diff" , The Jargon File, version 4.4.7
- ↑ IEEE Std. 1003.1-2001 specifies traditional, "ed script", and context diff output formats; IEEE Std. 1003.1-2008 added the (by then more common) unified format.