Updated: 24 October 2025
Apply a diff file to an original. Examples from here
Update file1.txt to make it identical to file2.txt
echo 'Hello, World!' > file1.txt
echo 'Hello, Linux!' > file2.txt
diff -u file1.txt file2.txt > file.diff
patch file1.txt < file.diff