How to use the diff command

Login to reply  Page: « < 1 of 1 > »
15 Nov 2008 - 12:54828
How to use the diff command
This is very basic, but I plan on adding more detail as the questions come up.

diff is a tool that can be use to create a “diff” or “patch” file that contains differences between two files. Though diff can write into many different format, most people will prefer the unified format as it is easier to work with.

How to use diff
The basic use of diff is,
diff -u original.txt modified.txt > file.patch

If you want to use diff against two directories, the command is,
diff -rupN original modified > program.patch


__________________
Rumble
The Builder Academy
tbamud.com 9091

Last edited by Rumble (15 Nov 2008 - 13:01)
Login to reply  Page: « < 1 of 1 > »