patch in Linux

patch contains the deltas to go from old version of the file to the new version of the file.

Create patchfile:

diff -Nur originalfile newfile > patchfile
Dry-run:
patch --dry-run -p1 < /tmp/syscall_patch
Apply patch:
patch -p1 < patchfile
patch originalfile patchfile