In the "old days," patches were used a lot more because they were smaller than the source-files that they patched. Nowadays they are most useful for documenting the differences between the "old" and "new" version of a particular text-file. Any difference, no matter how slight, will be detected.
patch can take a patch-file and source-file as input and produce a modified source-file as output. The process is based on the diff (file-difference) command and it's quite "smart."
The contents of a patch-file are contextual, not based on line-numbers but on content. The CVS version-control system is also based on this technology.
Last edited by sundialsvcs; 01-12-2006 at 10:08 AM.