D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

[LUG] diff "memory exhausted" - try using rdiff !



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rats, just wasted ages figuring out the "right thing" to do when "diff" can't 
cope because the files are too big.

Google returned lots of hits about DOS memory problems with GNU diff from ages 
past.

Even a post suggesting that "memory exhausted" is a poor error message because 
the memory is no more tired than it was before. Gee thanks guys.

However none of them actually suggested a decent workaround.

However if you need to diff two very large files with the intent of sending 
the difference to a remote user so he can get upto date, forget "diff -H" it 
is pants, use "rdiff".

It is available in Debian with the usual "apt-get install rdiff". You can use 
rdiff to sync two files from a common root, even if the files to compare are 
at different sites! The delta file will typically be larger than a delta from 
"diff", but heck if you had enough memory to run "diff" you wouldn't be 
reading this would you!

Writing a tool to generate diff style delta from rdiff style patches and the 
original file is left as an exercise to the reader obsessed with sending 
minimal difference files. Me I sent 33K delta for two 84MB files - I'm happy.

 Simon
-----BEGIN PGP SIGNATURE-----
Comment: The whole point of free is freedom to change, not low cost... --Eben Moglen

iD8DBQE/SVndGFXfHI9FVgYRAlvPAKCAtluh4vMjarqVmbwTs0FMzonOpQCgjWSR
BHTlVy98qI38J149Mbxmc3I=
=qXOS
-----END PGP SIGNATURE-----


--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly