"Comparing and Merging Files with GNU diff and patch" - читать интересную книгу автора (David MacKenzie, Paul Eggert, Richard Stallman)