LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-14-2002, 10:03 AM   #1
udayan
Member
 
Registered: Apr 2002
Location: India
Distribution: Linux Redhat 7.0
Posts: 62

Rep: Reputation: 16
patch file


hi,
how do i make a patch file. Where do i get info about this
 
Old 05-14-2002, 04:19 PM   #2
crabboy
Senior Member
 
Registered: Feb 2001
Location: Atlanta, GA
Distribution: Slackware
Posts: 1,821

Rep: Reputation: 121Reputation: 121
It's pretty standard to use the diff command.
Code:
diff -C3 file.c.old file.c.new > patchfile
To update the old file:
Code:
patch file.c.old < patchfile
The .old file will match the .new file exactly. Diff and patch will also work on directories.
 
Old 05-15-2002, 09:03 AM   #3
udayan
Member
 
Registered: Apr 2002
Location: India
Distribution: Linux Redhat 7.0
Posts: 62

Original Poster
Rep: Reputation: 16
well i made a new kernel image and have made changes in many files in the source code. I have the original source code also. But i gotta make a patch file and then try to implement it.

I tried this -
diff -druP /home/myname/origcode /usr/src/linux >patch

now how do i use this patch file to implement my changes in some original code.
thanx in advance
 
  


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
how to create patch for a file kskkumar Linux - Newbie 4 12-15-2008 05:36 AM
How to use patch file jnsg Slackware 2 10-23-2005 07:08 PM
how do i patch a file Hockeyfan Linux - Newbie 1 05-09-2004 03:05 AM
installing a .patch file nuzzy Linux - General 1 11-10-2003 05:30 PM
I have a patch (diff file). What now? Gurduloo Linux - Newbie 2 05-27-2003 02:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:27 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
Open Source Consulting | Domain Registration