chunks
    Martin Ameskamp 
    ma at informatik.uni-kiel.d400.de
       
    Thu Jan 27 10:27:24 EST 1994
    
    
  
> I have to pass a whole grass LOCATION over the net. Even
> compressed, the tar file is huge. How could I cut it
> in chunks so that I can transfer it? By now I always
> get a "broken pipe" on the ftp at some point.
	I believe there are programs to do this, but if all else
	fails, there's always good old dd:
	Consider the case where you want to cut file hugo (size 250k)
	into three chunks:
	dd if=hugo of=hugo.a bs=100000 count=1
	dd if=hugo of=hugo.b bs=100000 skip=1 count=1
	dd if=hugo of=hugo.c bs=100000 skip=2 count=1
	(note that hugo.c is less than one 'block' in size).
	cat hugo.a hugo.b hugo.c >hugo
	restores the original file.
	Of course, this can be done in a for loop for large sizes of
	chunks.
	Martin
--
Martin Ameskamp, Inst. f. Informatik I (Computing Dept.)
Kiel University, Olshausenstr. 40, 24118 Kiel, Germany
Fax: ++49 431 8804054, Voice: ++49 431 8804474, 
email: ma at informatik.uni-kiel.d400.de
    
    
More information about the grass-dev
mailing list