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 06-14-2011, 11:03 AM   #1
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,898

Rep: Reputation: 55
Diff: a quick guide for those who want to become acquainted with the basics.


This is not a technical question. I once saw an internet page explaining, in no more than two or three screens, the essentials of diff. I carefully sent it to the disk but, now, it seems I cannot figure out where exactly.

So, my question is: can anybody send me a link to a "guide" like the above mentioned?

What I remember well is that, by teaching that diff was conceived with the mind put in this scheme: given a file and diff output, construct a second file, which is "the other file" whose name was entered as the second argument of diff., the work of understanding diff output is half done.

However, there are three classes of items in the output whose meaning is nebulous to me: the numbers, such as 3a4,6; the signs < and > and the lines like ---------- (dashes). All three seem to play the role of separators.

Example: why some lines marked < and others > ? The dashes look like separating blocks of text.

Above all, it's very dificult for me to interpret what blocks of text belong to file 1 and which belong to file2.

Yes, I know. diff info pages are almost a tutor (some sections). But what I read, coming back to the thread subject, was really concise: Very well written and yet very small in extension.

In fact, any reference to reading material would be welcome.

Last edited by stf92; 06-14-2011 at 11:08 AM.
Old 06-14-2011, 11:22 AM   #2
Senior Member
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
There are many tutorials but in my opinion it is important to look at diff and patch together since they belong to each other, here you'll find a tutorial in PDF-format. A more complete tutorial here:


Last edited by markush; 06-14-2011 at 11:26 AM.
Old 06-14-2011, 04:07 PM   #3
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,898

Original Poster
Rep: Reputation: 55
I'm sorry, markush, for the delay. I wrote you several hours ago, but I must have done something wrong. Thank you for the two links and kind regards.


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
Suse Basics Printed Guide arunmongoose Linux - Newbie 2 11-19-2007 11:29 AM
Quick guide on tar bograt Linux - Newbie 11 01-27-2005 05:15 PM
Quick question: full-context diff? overbored Linux - Software 0 09-27-2004 04:11 AM
mplayer a quick guide aus9 Slackware 1 02-18-2004 11:37 AM
Quick guide to WordStar?? stephstellar Linux - Software 3 02-19-2003 12:27 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:17 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