LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-12-2006, 06:10 AM   #1
Karthikeyan Gurusamy
LQ Newbie
 
Registered: Dec 2005
Posts: 14

Rep: Reputation: 0
What is patch


Hi

Can anybody please tell me about patch in linux?

For what purpose patch is created and used?

Regards,

karthik
 
Old 01-12-2006, 07:10 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
If you run "man patch" on any Linux or Unix based system, or search the web for "man patch", "patch manual" etc, you will get detailed info about what patch is and what it does.
 
Old 01-12-2006, 07:11 AM   #3
alienDog
Member
 
Registered: Apr 2004
Location: Europe
Distribution: Debian, Slackware
Posts: 505

Rep: Reputation: 46
man patch:

patch takes a patch file patchfile containing a difference listing pro-
duced by the diff program and applies those differences to one or more
original files, producing patched versions.

In other words it's used to apply precreated (usuall with diff command) patches (=lists of changes to be made) to files.
 
Old 01-12-2006, 07:26 AM   #4
Karthikeyan Gurusamy
LQ Newbie
 
Registered: Dec 2005
Posts: 14

Original Poster
Rep: Reputation: 0
Thanks alien!

can we say patch is like program to fill the defectives of
previous version of one program?

regards,

karthik
 
Old 01-12-2006, 07:36 AM   #5
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 55
Good link taken directly from the kernel source:

http://developer.osdl.org/dev/robust...ng-patches.txt


A patch is a text document to change something from one version to another. As you said, it can correct bug but can also add some special functionnality.
 
Old 01-12-2006, 11:07 AM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,151

Rep: Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203Reputation: 2203
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 11:08 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to patch 2.6.11.7 kernel with Reiser4 mm patch SlackwareInAZ Slackware 9 04-26-2005 07:33 AM
Patch-o-matic TTL Patch Knopper Fedora 1 02-02-2005 11:27 AM
How to Install patch-o-matic(a iptables patch) on redhat 9? itebooks Linux - Security 1 07-23-2004 09:51 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 02:21 PM
How to Apply patch for Mass Storage device to work? (uss725-2.4.20-rc2.patch) cevjr Linux - Hardware 3 04-21-2004 12:14 AM


All times are GMT -5. The time now is 02:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration