Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 05-29-2010, 04:10 AM   #1
LQ Newbie
Registered: May 2010
Posts: 1

Rep: Reputation: 0
why use diff

i want to know why do we need to patch files based upon diff when we can directly overwrite the old file with the new file.

Please recommend
Old 05-29-2010, 04:17 AM   #2
LQ Guru
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,710

Rep: Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887
Put yourself in the position of a kernel programmer. He fixes three of the thousands of files in one modules 17 directories down and adds a new subdir to that directory with a few files in it. If he didn't have diff, how would he distribute this work?
Old 05-29-2010, 04:41 AM   #3
LQ Guru
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,565

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
Plus patching is quite often the precursor to the next release but until it comes out and fixes the relevant issues the patch is supplied.
Old 05-29-2010, 06:38 AM   #4
Registered: Oct 2009
Location: England
Distribution: *buntu, Vector
Posts: 499

Rep: Reputation: 102Reputation: 102
Size, and also maybe to not clash with other changes.
Old 05-29-2010, 07:28 AM   #5
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Its also a brilliant way of looking at what this new code contains; a few times I've seen patches which are no better than the code they replace, and have been in a position to say so. If I was being sent a tarball of the whole thing then we'd probably have to keep running the new bad code until it broke and we fixed it again.


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
Using Diff metallica1973 Linux - General 17 12-06-2007 08:38 AM
What is the diff between / and // stardotstar Linux - Newbie 1 09-30-2004 02:02 AM
Dual Boot diff Hard Disk diff OS on Suse 9.1 wilhem Linux - Newbie 1 08-13-2004 07:06 PM
So, What's the diff.? The Manic Mouse Linux - Distributions 3 03-19-2004 08:38 AM
What a Diff! perry General 0 12-05-2003 08:10 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:12 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration