English [en]

GNU Diffutils

GNU Diffutils is a package of several programs related to finding differences between files.

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 on the main GNU ftp server: http://ftp.gnu.org/gnu/diffutils/ (via HTTP) and ftp://ftp.gnu.org/gnu/diffutils/ (via FTP). It can also be found on the GNU mirrors; please use a mirror if possible.


Documentation for Diffutils is available online, as is documentation for most GNU software. You may also find more information about Diffutils by running info diffutils or man diffutils, or by looking at /usr/doc/diffutils/, /usr/local/doc/diffutils/, or similar directories on your system. A brief summary is available by running diffutils --help.

Mailing lists

Diffutils has one mailing list: <bug-diffutils@gnu.org>. This is used to discuss all aspects of Diffutils, including development and enhancement requests, as well as bug reports.

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

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

Getting involved

Development of Diffutils, and GNU in general, is a volunteer effort, and you can contribute. For information, please read How to help GNU. If you'd like to get involved, it's a good idea to join the discussion mailing list (see above).

Test releases
Trying the latest test release (when available) is always appreciated. Test releases of Diffutils can be found at http://alpha.gnu.org/gnu/diffutils/ (via HTTP) and ftp://alpha.gnu.org/gnu/diffutils/ (via FTP), and from some mirrors.
For development sources, bug and patch trackers, and other information, please see the Diffutils project page at savannah.gnu.org.
Translating Diffutils
To translate Diffutils's messages into other languages, please see the Translation Project page for Diffutils. If you have a new translation of the message strings, or updates to the existing strings, please have the changes made in this repository. Only translations from this site will be incorporated into Diffutils. For more information, see the Translation Project.
Diffutils is currently being maintained by Jim Meyering and Paul Eggert. Please use the mailing lists for contact.


Diffutils is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.


 [FSF logo] “The Free Software Foundation (FSF) is a nonprofit with a worldwide mission to promote computer user freedom. We defend the rights of all software users.”