[root@localhost test]# cat test1
aaaa
[root@localhost test]# cat test2
aaaa
bbbb
[root@localhost test]#
[root@localhost test]# diff test1 test2 > test.patch
[root@localhost test]#
[root@localhost test]# patch -n test1 test.patch
patching file test1
[root@localhost test]#
[root@localhost test]# cat test1
aaaa
bbbb |