jQuery in Action, 2nd edition*
The moose likes Java in General and the fly likes File Delta Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "File Delta" Watch "File Delta" New topic
Author

File Delta

Grant Crofton
Ranch Hand

Joined: Nov 08, 2000
Posts: 154
Hi.
I'm trying to find a way of comparing two files, and finding out the differences between them - preferably without having the files to compare, so using some kind of checksum. This is in order to have a backup of a file, and when you back it up next, to only back up the parts of the file that have changed.
I think you'd need some hard maths to work this sort of thing out, but if anyone knows of a site with any information about it, I'd be grateful.
Thanks.
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
No easy task. If your really serious on this, I suggest you check out diffutils from GNU. It will be a fairly large project but, you could port this from it's original c source to Java. Or, you could just create a gui front end to the exe in java.
Hope this helps and good luck


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Grant Crofton
Ranch Hand

Joined: Nov 08, 2000
Posts: 154
Thanks, Carl, that looks like it will be useful.
You've been very helpful today.
Here, have five stars for helpfulness:
*****
 
jQuery in Action, 2nd edition
 
subject: File Delta
 
Similar Threads
Version/release maintainance
Renaming the logs in Unix without shutting the server
Is overriding finalize () a convenient way to delete temporary files?
Read n Modify Text file
Project failing to open on Netbeans