Linux Ask!

Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.

Compare difference of two files side by side

Answer:

To compare the difference of two text files side by side, use the diff command with -y option

E.g.

# diff -y 1.txt 2.txt

a                                                               a
b                                                               b
c                                                               c
                                                              > d

As you can see, the only difference between two files is the character d.

  1. Compare the difference between two directories
  2. Open two files side by side using vim
  3. How to ignore blank lines when creating the diff of two files
  4. How to find the differences between two files over SSH
  5. How to diff two remote files over ssh?

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>