Diff Linux command — Find the difference in files the easier way.
2009-09-17
230 words
2 mins read
In Linux you can use diff command to find the differences in file.
What is interesting is that you can use ”diff -u” to list the differences with ’+’ and ’-’ rather than sometimes confusing ’>’ and '<’.
An interesting article on finding the difference in files can be read <a href="http://docs.hp.com/en/5971-3502/5971-3502.pdf">here.
For reference:<h3 class="post-title entry-title"> <a set="yes" linkindex="1" href="http://amjith.blogspot.com/2007/07/visual-diff-tools-in-linux.html">Visual Diff Tools in Linux <div class="post-body entry-content"> <div style="text-align: center;">*\*This is a not a post about how to use diff and patch commands.****
<span style="font-weight: bold;">Command Line:
<span style="color: rgb(51, 51, 255);">sdiff file-1 file-2
This is a much more elegant tool compared to diff, if you are looking for a quick command-line utility that shows the difference between two text files. While using it on big files, its better to pipe the output to less command.
<span style="color: rgb(51, 51, 255);">sdiff file1 file2 | less