Diff and patch command

Diff and patch command

Posted By: pmietlicki

Published to Linux on Jun 01, 2015

To create the patch file, you'll have to use the diff command :

diff -u file.old file.new > file.patch

The file.patch will contain all the instructions to transform the content of file.old to file.new, you can transmit it to patch file.old to other users :

patch -p0 file.old

Tags: diff, patch