1

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!!

2 Answers 2

3
$ 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
Sign up to request clarification or add additional context in comments.

Comments

3

Simple: diff path/to/file1 path/to/file2

Comments

Your Answer

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.

Ask question

Explore related questions

See similar questions with these tags.