Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I compare two files: local and remote on http server without downloading?

Tags:

java

android

I want to compare two files (one file is located on local location and second is located on http server). Can I do that without downloading? I want to know that two files is completely the same.

like image 687
user1249936 Avatar asked Apr 04 '12 13:04

user1249936


People also ask

How do local and remote files compare?

Compare a remote file with its local versionOpen the Remote Host tool window (Tools | Deployment | Browse Remote Host or View | Tool Windows | Remote Host) and select the required deployment server from the list. Select the file, and then select Compare with local version from its context menu.

How do I compare two WAR files in Intellij?

In the Project tool window, select the files you want to compare and choose Compare Files, or press Ctrl+D . Alternatively, select one file, choose Compare With from its context menu, and select a file that is outside your project.


2 Answers

  1. Hash the files in both sides
  2. Get the hash from the server
  3. Compare to local file's hash
like image 189
MByD Avatar answered Oct 23 '22 01:10

MByD


Depends on what level of comparison you need. I assume you don't want to upload your local copy to the server either. You could easily take a hash of the file using MD5 or SHA1 and send that hash to the server to compare the files. If the hashes match they are the same. If they differ then you could then choose to upload the file for diff type comparison.

like image 40
chubbsondubs Avatar answered Oct 23 '22 00:10

chubbsondubs