GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing en.wikipedia.org — patch (Unix) - Wikipedia (Redirected from Patch file)
Developed by a programmer for other programmers, Patches described here should not be confused with binary patches, which, although they can be conceptually similar, are distributed to update binary files comprising the program to a new release. The original UseAs patch files are text, they can be used with processes such as quality review and modification via a text editor. In addition to the Patches have been the crucial component of many source control systems, including CVS. Advanced diffsFurther information: diff § Variations
When more advanced diffs are used, patches can be applied even to files that have been modified in the meantime, as long as those modifications do not interfere with the patch. This is achieved by using "context diffs" and "unified diffs" (also known as "unidiffs"), which surround each change with context, which is the text immediately before and after the changed part. Patch can then use this context to locate the region to be patched, even if it has been displaced by changes earlier in the file, using the line numbers in the diffs as a starting point. Because of this property, context and unified diffs are the preferred form of patches for submission to many software projects. The above features make diff and patch especially popular for exchanging modifications to open-source software. Outsiders can download the latest publicly available source code, make modifications to it, and send them, in diff form, to the development team. Using diffs, the development team has the ability to effectively review the patches before applying them, and can apply them to a newer code base than the one the outside developer had access to. ExamplesThe following command creates a patch file, $ diff -u oldFile newFile > patchFile The following command applies the changes to the file identified in $ patch < patchFile Patching a file in a subdirectory requires the additional A patch can be undone, or reversed, with the $ patch -R < patchFile If the file used as the original is significantly different from the actual original file, the patch cannot be cleanly applied. For example, if lines of text are inserted at the beginning, the line numbers referred to in the patch will be incorrect. See also
References
External linksThe Wikibook Guide to Unix has a page on the topic of: Commands
| ||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | ||||||||||||||||