Diffutils

Introduction to Diffutils

Computer users often find occasion to ask how two files differ. Perhaps one file is a newer version of the other file. Or maybe the two files started out as identical copies but were changed by different people.

You can use the diff command to show differences between two files, or each corresponding file in two directories. diff outputs differences between files line by line in any of several formats, selectable by command line options. This set of differences is often called a `diff' or `patch'. For files that are identical, diff normally produces no output; for binary (non-text) files, diff normally reports only that they are different.

You can use the cmp command to show the offsets and line numbers where two files differ. cmp can also show all the characters that differ between the two files, side by side.

You can use the diff3 command to show differences among three files. When two people have made independent changes to a common original, diff3 can report the differences between the original and the two changed versions, and can produce a merged file that contains both persons' changes together with warnings about conflicts.

You can use the sdiff command to merge two files interactively.

Downloading Diffutils

Diffutils can be found in the directory http://ftp.gnu.org/pub/gnu/diffutils/ [via HTTP] and ftp://ftp.gnu.org/gnu/diffutils/ [via FTP]. It can also be found on one of our FTP mirrors; please use a mirror if possible.

Test releases, which should not be used in production, are available in the directory ftp://alpha.gnu.org/pub/gnu/diffutils/. The latest publicly-available sources, which are even more bleeding-edge than the test releases, can be found in the Savannah public area for Diffutils. For other ways to obtain Diffutils, please read How to get GNU Software.

Documentation

Diffutils documentation can be found at http://www.gnu.org/manual/. You may also find more information about Diffutils by running info diff, man diff, or looking at /usr/doc/diffutils/ or /usr/local/doc/diffutils/ on your system.

Mailing Lists/Newsgroups

Announcements about Diffutils and most other GNU software are made on <info-gnu@gnu.org>.

To subscribe to this or any GNU mailing lists, please send an empty mail with a Subject: header line of just "subscribe" to the relevant -request list. For example, to subscribe yourself to GNU announcement list, you would send mail to <info-gnu-request@gnu.org> with no body and a Subject: header line of just "subscribe". Or you can use the mailing list web interface.

Request an Enhancement

If you would like any new feature to be included in future versions of Diffutils, please send a request to <help-gnu-utils@gnu.org>.

Please remember that development of Diffutils is a volunteer effort, and you can also contribute to its development. For information about contributing to the GNU Project, please read How to help GNU.

Report a Bug

If you think you have found a bug in Diffutils, then please send as complete a report as possible to <bug-gnu-utils@gnu.org>. Send as precise a description of the problem as you can, including the output of diff --version and sample input files that produce the bug, if applicable. If you have a patch, please send it too. It may simplify the maintainer's job if the patch is relative to the latest publicly-available sources or to a recent test release, which you can find as described above.

Maintainer

Diffutils is currently being maintained by Paul Eggert.

back to top

Translations of this page

Diffutils - GNU difference utilities

Diffutils - GNU difference utilities

Introduction to Diffutils

Computer users often find occasion to ask how two files differ. Perhaps one file is a newer version of the other file. Or maybe the two files started out as identical copies but were changed by different people.

You can use the diff command to show differences between two files, or each corresponding file in two directories. diff outputs differences between files line by line in any of several formats, selectable by command line options. This set of differences is often called a `diff' or `patch'. For files that are identical, diff normally produces no output; for binary (non-text) files, diff normally reports only that they are different.

You can use the cmp command to show the offsets and line numbers where two files differ. cmp can also show all the characters that differ between the two files, side by side.

You can use the diff3 command to show differences among three files. When two people have made independent changes to a common original, diff3 can report the differences between the original and the two changed versions, and can produce a merged file that contains both persons' changes together with warnings about conflicts.

You can use the sdiff command to merge two files interactively.

The Diffutils manual is available.

Downloading Diffutils

Diffutils can be found in the directory http://ftp.gnu.org/pub/gnu/diffutils/ or from a GNU FTP Mirror Site. Test releases, which should not be used in production, are available in the directory ftp://alpha.gnu.org/pub/gnu/diffutils/. The latest publicly-available sources, which are even more bleeding-edge than the test releases, can be found in the Savannah public area for Diffutils. For other ways to obtain Diffutils, please read How to get GNU Software.

Reporting Bugs in Diffutils

If you think you have found a bug in Diffutils, please report it by electronic mail to the GNU utilities bug report mailing list <bug-gnu-utils@gnu.org>. Send as precise a description of the problem as you can, including the output of diff --version and sample input files that produce the bug, if applicable. If you have a patch, please send it too. It may simplify the maintainer's job if the patch is relative to the latest publicly-available sources or to a recent test release, which you can find as described above.
Return to GNU's home page.

Please send FSF & GNU inquiries & questions to <gnu@gnu.org>. There are also other ways to contact the FSF.

Please send comments on these web pages to <webmasters@gnu.org>, send other questions to <gnu@gnu.org>.

Copyright © 2005, 2006 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.

Last updated: $Date: 2008/03/11 22:12:58 $ $Author: eggert $