ssh <remote-host> "cat /path/to/remotefile" | diff - /path/to/localfile
For example
gen@lostwarrior:~/Mypace/base/layout$ ssh gen@genlinux.org "cat /home/genlinux/base/layout/base.txt" | diff - /home/gen/base/layout/base.txt
Here
- gen@genlinux.org is the remote server
- /home/genlinux/base/layout/base.txt is the remote file
- /home/gen/base/layout/base.txt is the local file
How about a recursive diff for a directory tree? Any ideas?
ReplyDelete