Table of Contents

diff

alternative output formats

create patch file

count lines that are different

This outputs 2 columns, hiding lines that are the same, then pipes the result through the wc program with the flag to count newlines.

diff -y --suppress-common-lines file1.txt file2.txt | wc -l

help

The diff utility has a man page, but the more comprehensive documentation is available in info format (info diff).