unix diff command question
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
Simple: diff path/to/file1 path/to/file2
精彩评论