Archive for August, 2008

The diff command

If you're new here, you may want to subscribe to my RSS feed.

The diff command is a very useful command to see the differences between two files. An example of this command would be

diff file1.txt file2.txt

It takes file2.txt and compares it to file1.txt and displays the differences that are in file2.txt. You may also want to use the -b options in the command because that will allow it to ignore differences in white space. This command is very useful in programming when you have a backup version of a script that you just modified. If the script no longer works it can help you track down bugs, by looking at backup version of the script that does work.