//View Tip #536
Similar Tips
» Using comm
» SSH tab completion
» Connect your mic to a remote speaker
» vimdiff and svn
» Diff Two Directories


Latest tips by RSS
Click here to subscribe
Follow Shell-Fu on Twitter
Click here to follow
Follow Shell-Fu on identi.ca
Click here to follow
Suppose we have to find the differences between local file "/tmp/localfile" and remote file "/tmp/remotefile" located on remote host

This is how can do it:
$ ssh user@ "cat /tmp/remotefile" | diff - /tmp/localfile

And using vimdiff:
$ vimdiff scp://user@ /tmp/localfile

(of course we would need ssh to work using public key authentication so that we can do remote commands execution without being prompted for passwords).

View Comments »


Add your comment

Comments are currently disabled
No Comments

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit