how to create a patch file in linux

  1. open up your terminal
  2. diff -u [file1] [file2] > [file3] where [file1] is the path to the original file, [file2] the path to the updated one and [file3] the name you desire for the patch file

[source]