- Open a terminal, and run the following commands in order to understand the diff command:
$ diff /etc/updatedb.conf ~/updatedb-v2.conf$ diff -urN /etc/updatedb.conf ~/updatedb-v2.conf
- At this point, only the diff information has been output to the console's standard out and a patch file has not been created. To create the actual patch file, execute the following command:
$ diff -urN /etc/updatedb.conf ~/updatedb-v2.conf > 001-myfirst-patch-for-updatedb.patch
Patches can be found in many forms, but they usually have the .patch extension and are preceded by a number and a human readable name.
- Now, before applying a patch, it can also be tested to ensure that the results are as expected. Try the following commands:
$ echo ...