Compare a remote file with a local file

ssh user@host cat /path/to/remotefile | diff /path/to/localfile -
Useful for checking if there are differences between local and remote files.

172
By: root
2009-02-04 11:33:19

6 Alternatives + Submit Alt

What Others Think

These commands all require transferring the entire file to the local computer, if the file is large or you are on a slow link this command is very slow. I have posted an alternative that computes the md5sum instead but it has yet to be approved.
gnif · 312 weeks and 4 days ago
kitchen remodeling grand rapids you are soo inspiring! thanks for this!
yeoyeo · 22 weeks and 4 days ago
great site! glad i found this. any recent updates? painters huntsville
looneyhans · 8 weeks and 6 days ago
This article is an engaging abundance of enlightening information that is intriguing and elegantly composed. I praise your diligent work on this and thank you for this data. You have what it takes to get consideration. ??
KayGasaway · 5 weeks and 5 days ago
Someone Sometimes with visits your blog regularly and recommended it in my experience to read as well. The way of writing is excellent and also the content is top-notch. Thanks for that insight you provide the readers! ??
KayGasaway · 5 weeks ago
This is my first time visit to your blog and I am very interested in the articles that you serve. Provide enough knowledge for me. Thank you for sharing useful and don't forget, keep sharing useful info: ????
KayGasaway · 4 weeks and 3 days ago
Thats just great solution of the problem! Very helpful I am new to coding try to learn something new Now I am just an editor with https://writingservicesrank.com/ but I am working hard
PatrickHenderson · 3 weeks and 5 days ago
Hi there, I found your blog via Google while searching for such kinda informative post and your post looks very interesting for me. Onewheel
KayGasaway · 3 weeks ago
I want to say thanks for beautiful blog sharing with us. Your blog really great resource to update my knowledge. Onewheel
KayGasaway · 2 weeks and 3 days ago
You've completed in excellent work. t suggest to my frtends ind personilly wtll certitnly dtgtt. t'm conftdent they'll be gitned from thts webstte. Managed IT Support near me Rancho Park Los Angeles
KayGasaway · 2 weeks and 1 day ago
This particular papers fabulous, and My spouse and i enjoy each of the perform that you have placed into this. I’m sure that you will be making a really useful place. I has been additionally pleased. Good perform! https://war-fighters.net
KayGasaway · 2 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: