Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Just started with diff command. Can you please explain me,

diff thin_provisionings_controller.rb thin_provisionings_controller.rb[211]

512,513d511

   include ThinProvisioningsGraphModule

So does that says to delete lines 512, 513 and add 511? As described by this article http://lowfatlinux.com/linux-compare-files-diff.html

share|improve this question

migrated from stackoverflow.com Feb 22 '12 at 14:35

This question came from our site for professional and enthusiast programmers.

4  
I recommend you use unified diffs (add -u). They're easier to read and more resilient to unrelated changes. –  Matthew Flaschen Feb 20 '12 at 2:15
add comment

1 Answer 1

up vote 4 down vote accepted

Use diff -y, which stands for diff --side-by-side. It will show the output in two columns, one for each file. The columns will be in the same order you input the files on the command line.

share|improve this answer
1  
Wow! I never knew about the -y option! –  Barun Feb 22 '12 at 17:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.