GNU Info

Info Node: (diff.info)Brief

(diff.info)Brief


Next: Binary Prev: Specified Folding Up: Comparison
Enter node , (file) or (file)node

Summarizing Which Files Differ
==============================

   When you only want to find out whether files are different, and you
don't care what the differences are, you can use the summary output
format.  In this format, instead of showing the differences between the
files, `diff' simply reports whether files differ.  The `-q' and
`--brief' options select this output format.

   This format is especially useful when comparing the contents of two
directories.  It is also much faster than doing the normal line by line
comparisons, because `diff' can stop analyzing the files as soon as it
knows that there are any differences.

   You can also get a brief indication of whether two files differ by
using `cmp'.  For files that are identical, `cmp' produces no output.
When the files differ, by default, `cmp' outputs the byte number
(starting at 1) and line number where the first difference occurs.  You
can use the `-s' option to suppress that information, so that `cmp'
produces no output and reports whether the files differ using only its
exit status (Note: Invoking cmp).

   Unlike `diff', `cmp' cannot compare directories; it can only compare
two files.


automatically generated by info2www version 1.2.2.9