Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
I got two files. I want to use diff to compare those to see what has been changed. I checked man diff but there are log of options. Could anyone give me a quick hint what should I do? thank you you all!!
$ diff -u module.erl.orig module.erl.new
will give you a differences between files in unified form. You can also save them to a file
$ diff -u module.erl.orig module.erl.new > module.erl.patch
And patch an original file to have these changes:
$ patch -p module.erl.orig < module.erl.patch
Add a comment
Simple: diff path/to/file1 path/to/file2
diff path/to/file1 path/to/file2
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.