Math-Linux.com

Knowledge base dedicated to Linux and applied mathematics.

Home > Linux > Tip of the day > How to diff remote files using ssh ?

How to diff remote files using ssh ?

All the versions of this article: [English] [français]

One file is on remote server

diff /path/to/file <(ssh RemoteServer 'cat /path/to/file')

You can also use vimdiff hack (do not forget double slash !!!)

vimdiff /path/to/file scp://remotehost//path/to/file

Both files are on remote servers

diff <(ssh RemoteServer1 'cat /path/to/file') <(ssh RemoteServer2 'cat /path/to/file')

Any message or comments?

comments powered by Disqus