This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: split and cat (NBY)


On 23 Jan 98 at 22:31,  malcolm <malcolm@eml.co.uk> wrote:

> Are split and cat supposed to work properly as a means of splitting
> large binary files and joinging the pieces back together. I find that
> split craps out having performed a good job of creating nothing useful.
> If I use split on a Linux box and then try to use cat to put the bits
> back together, that fails as well. Typical files I have tried are 10+MB
> being split into 1MB chunks.
> 
> Just curious to hear if anyone has got them to work - in which case its
> my setup. Or if its a common problem, is a fix on the way?
> 
> regards
> malcolm
> 

Hello malcom!

congratulations: like everybody else you've been bitten by the
binary/non-binary file dichotomy in gnu-win32. :-)

It's being discussed a long ago in this mailing list; recently in a long thread
named "Why text=binary mounts".  This thread is a must read, as it explains
the problem as well as discuss alternatives to it.  I guess that gnu-win32
won't be the same after it.

In short words it is: if you don't use a binary partition, created with

mount -b <MS-DOS path> <Unix path>

most of the time the gnu-win32 system will understand that you're trying to
open the files in text (filtered, or "cooked") mode.  In that mode, for
instance, the value 0x1a means EOF, or End-Of-File; such a character causes a
file reading to stop.  

That kind of translation has odd effects in binary files.

The GNU-Win32 FAQ (http://www.cygnus.com/misc/gnu-win32/) comment on this; see 
specially the question "How is the DOS/Unix CR/LF thing handled?"


Regards,
++Hilton

-------------------
Hilton Fernandes
email: hgfernan@usp.br
www:   http://www.lsi.usp.br/~hilton.html (inactive)
M. Sc. Student of Parallel Distributed Applications
at Escola Politecnica (Polytechic School)
University of S. Paulo - Brazil
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]