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.

How to find the differences between two files over SSH

Answer:

If the files you want to compare are on different machines, you can combine ssh and diff for the comparsion.

E.g.

ssh john@192.168.11.5 "cat /tmp/foo.txt" | diff - /tmp/bar.txt

  1. How to find the differences between two files
  2. How to diff two remote files over ssh?
  3. How to find the differences between two files (visually)
  4. How to ignore blank lines when creating the diff of two files
  5. Find files by owner

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>