SSHFS and Meld : Compare Remote Files Easily

If you’d asked me two years ago to compare a local file to one on a remote server, I would’ve simply SCP’d the file down and diff’d the two files. That’s pretty quick to do and it doesn’t take too much brain power. Then something happened – I discovered meld, thanks to Jeremy. If you have never heard of meld, install it this instant and you will be glad you did.

Meld is one of my “desert island” tools. If I were stuck on a desert island which had a tough development deadline with¬†electricity, computers, internet and yet somehow no means of escape, I would take meld with me. As well as intuitively comparing two files side-by-side, it can compare three files side-by-side; ideal for resolving merge conflicts. It integrates with a number of version control systems so you can simply meld a single file and, if appropriate, meld will show the outstanding uncommitted changes.

Meld Screenshot

As with diff, it can¬†recurse through directories, but the presentation is fantastic showing you all matching and mis-matching directories easily. Resolving or copying differences between panes is a doddle and there’s nothing quite as satisfying as seeing a completely matching set of files.

Allied with meld is another tool that I discovered at approximately the same time, SSHFS. This, as you may have already guessed, allows you to mount a remote file system over SSH as if it were local. Very quickly now you can diff entire directories on remote machines very un-intrusively and very safely (especially if you mount with -o ro).

There is no excuse for you not to install these two tools. Download them today using your package manager of choice and have a play.

%d bloggers like this: