开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜