Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Softpanorama Search

Patch

patch is used with the output of diff, the so-called context diffs between two items, to make selective changes. A typical use of patch is to update your copy of a program's source code. The code has changed very little, so it makes more sense to download only context diffs, or patches, rather than downloading the entire distribution. In this case, the diffs cover entire directories, not just individual files.

Almost all context diffs are applied to a subdirectory. The syntax is then patch -pnumber < patch_name. (That is, the file is used as redirected input to the command.) The number depends on how deep the subdirectory lies below the current directory. A patch will generally include instructions for where to place it and what number to use.

Recommended Links

Patch (computing) - Wikipedia, the free encyclopedia

patchutils



Copyright © 1996-2009 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

Disclaimer:

Last modified: August 08, 2009