- publishing free software manuals
Picture of Cover

Comparing and Merging Files with GNU diff and patch

by David MacKenzie, Paul Eggert, and Richard Stallman

Paperback (6"x9"), 120 pages. Out of print - copies may still be available from some bookstores.
Retail Price: $19.95 (£12.95 in UK)
ISBN: 0-9541617-5-0 (ISBN-13: 978-0-9541617-5-0)


This book has received an extremely positive review in Linux User and Developer Magazine:
"Well packaged... the quality of information is excellent" --- Linux User and Developer Magazine (Issue 36, Feb 2004)

About the Book

This manual describes how to compare and merge files using GNU diff and patch.

It includes an extensive tutorial that guides the reader through all the options of the diff and patch commands. Later chapters cover powerful time-saving techniques such as automatic merging of divergent branches of a source tree.

This is a printed copy of the official GNU diffutils manual. It documents all the diffutils programs (diff, cmp, sdiff, diff3), plus GNU patch. The versions covered are the 2.8 release of GNU diffutils and 2.5 release of patch.

The authors of this manual are the original developers of the GNU diffutils programs.

You can examine the contents of the printed book here,

For each copy of this manual sold, $1 is donated to the Free Software Foundation.

As of September 2013 the total amount donated to FSF is $4,529 from the sale of this and other books.

This book is published under the GNU Free Documentation License.


This title is now out of print but you may still be able to obtain copies from some bookstores.

If you require further assistance, please send an email to sales@network-theory.co.uk.

Related Titles

Further Information

For questions about this book, please use our email address sales@network-theory.co.uk.

Table of Contents

  1. Overview
  2. Comparison
  3. Output Formats
  4. Incomplete Lines
  5. Comparing Directories
  6. Adjusting Output
  7. diff Performance
  8. Comparing Three Files
  9. diff3 Merging
  10. Interactive Merging
  11. Merging with patch
  12. Making Patches
  13. Invoking cmp
  14. Invoking diff
  15. Invoking diff3
  16. Invoking patch
  17. Invoking sdiff
  18. Standards conformance
  19. Projects
  20. Copying This Manual
  21. Index