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 · 335 weeks ago
kitchen remodeling grand rapids you are soo inspiring! thanks for this!
yeoyeo · 45 weeks ago
great site! glad i found this. any recent updates? painters huntsville
looneyhans · 31 weeks and 2 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 · 28 weeks and 1 day 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 · 27 weeks and 3 days 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 · 26 weeks and 6 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 · 26 weeks and 1 day 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 · 25 weeks and 3 days ago
I want to say thanks for beautiful blog sharing with us. Your blog really great resource to update my knowledge. Onewheel
KayGasaway · 24 weeks and 6 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 · 24 weeks and 4 days 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 · 24 weeks and 3 days ago
Hey There. I found your blog using msn. This is a very well written article. I’ll be sure to bookmark it and come back to read more of your useful info. Thanks for the post. I’ll definitely return. http://www.kanatarimsandtire.ca/tires-ottawa/snow-tires.html">kanata winter tires
KayGasaway · 20 weeks and 5 days ago
Find the Maldives Holidays Package & right Luxury hotel for your honeymoon or Holidays Rawnaq Tourism recommends the Best MaldivesM Hotels depending on your individual needs
KayGasaway · 20 weeks and 5 days ago
I think this is one of the most significant information for me. And i’m glad reading your article. But should remark on some general things, eye doctor Collinsville
KayGasaway · 19 weeks and 2 days ago
No Deposit Casino Sites 2021 are quite a popular choice for players online, casino with no deposit is a very effective way to play online games without spending any capital start. No Deposit Casino Sites 2021
KayGasaway · 8 weeks and 6 days 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: