Diff’ing files over the network

This is a godsend. Wish I had thought about doing this before.


$ diff source/worksforme.php <(ssh -n me@liveserver cat /home/me/source/worksforme.php)

You can also compare files on two remote hosts.


$ diff <(ssh -n me@testserver cat /home/me/source/worksforme.php) <(ssh -n me@clientserver cat /home/me/source/worksforme.php)

5 thoughts on “Diff’ing files over the network

  1. Nice! I think I’ve used M-x ediff in combination with TRAMP to similar effect.

    BTW, are you using bash? I’m so fond of zsh now.. has some real command-line wizardry, like programmable completion. Some onlooker was impressed the other day whan TAB completed not just commands in $PATH, but –options and even svn:// repository paths.

  2. Actually, I’m a fan of fish. Mainly I like that it focuses on making complex shell work simple (without lots — or any — customization), and that.. it kind of reminds of AmigaDOS.

Leave a Reply

Your email address will not be published. Required fields are marked *