Diff a remote file with a local file on linux
In below command we are running a cat command on the remote file through an ssh session and use the output to diff with the local file.
ssh account@remotehost "cat {pathtoremotefile}/file.txt" | diff - {pathtolocal_file}/file.txt
Written by Dipak Dusane
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Linux
Authors
Related Tags
#linux
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#