//View Tip #536
Similar Tips
» Connect your mic to a remote speaker
» Using comm
» bzip2 ssh copy and machine power off
» Diff Two Directories
» SSH tab completion

 

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 123.4.5.6

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

And using vimdiff:
$ vimdiff scp://user@123.4.5.6//tmp/remotefile /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 »




Comments 

Add your comment

Comments are currently disabled
No Comments

Home Latest Browse Top 25 Random Hall Of Fame Contact Submit