10.4.1. 从源代码文件导出差异

下面的操作,导出两个源文件的不同,并根据文件的位置,创建通用 diff 文件”file.patch0“ 或 “file.patch1“.

  1. $ diff -u file.old file.new > file.patch0
  2. $ diff -u old/file new/file > file.patch1