2008-12-03

diff large files under Solaris

Did you ever notice that the diff command cannot handle files larger 2 GB under SunOS Solaris? You will get a nice error message like:

Error: Value too large for defined data type
That is because its file I/O calls are based on 32 bit file offsets. Luckily Sun provides the alternate bdiff command, which uses 64 bit offsets. They could have just fixed diff in the first place, but whatever...

2 comments:

Ian Cottam said...

If you Google for idiffh.c, you should find my version of diffh which I use with enormous files. Never tried it on Solaris, but would be interested in hearing if it works.
ian AT cottamgoble.co.uk

jowdjbrown said...

Cloud Platform. A day in the clouds. 02.18.2014Microsoft Enterprise team. Discover the secrets of how Microsoft runs its own cloud platform. Watch Video.
Cloud Microsoft