Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


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

Rep: Reputation: 16
patch file

how do i make a patch file. Where do i get info about this
Old 05-14-2002, 05:19 PM   #2
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.
diff -C3 file.c.old > patchfile
To update the old file:
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, 10:03 AM   #3
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


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 06:36 AM
How to use patch file jnsg Slackware 2 10-23-2005 08:08 PM
how do i patch a file Hockeyfan Linux - Newbie 1 05-09-2004 04:05 AM
installing a .patch file nuzzy Linux - General 1 11-10-2003 06:30 PM
I have a patch (diff file). What now? Gurduloo Linux - Newbie 2 05-27-2003 03:20 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:25 AM.

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