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.

Feb 222011

How to diff two remote files over ssh?


Assume you have two files on two different machine, how do you do a diff of them?

Simply use the command below:

# diff <(ssh server_1 'cat foo1') <(ssh server_2 'cat foo2')

 Leave a Reply



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>