Contents / Previous / Next


diff - Compare Files

diff: Compare files line by line.
       diff [OPTION]... FILES

Options:

       -i  --ignore-case
              Ignore case differences in file contents.

       -b  --ignore-space-change
              Ignore changes in the amount of white space.

      --suppress-common-lines
              Do not output common lines.

       -w  --ignore-all-space
              Ignore all white space.

       -B  --ignore-blank-lines
              Ignore changes whose lines are all blank.

       -q  --brief
              Output only whether files differ.

       -y  --side-by-side
              Output in two column


Example:

> diff -y -b t1 t2

hallo                                                           hallo

this is                                                         this is

1                                                             | 2

end                                                             end

> diff --suppress-common-lines  -y -b t1 t2
1                                                             | 2

> diff -b t1 t2
6c6
< 1
---
> 2


xdiff and kompare: Graphical output diff (requires X11).