[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dd in loop doesn't transfer full blocks

From: jim
Subject: Re: dd in loop doesn't transfer full blocks
Date: Wed, 08 Dec 2010 15:04:11 -0000
User-agent: G2/1.0

On Oct 6, 2:37 am, Henrik Carlqvist <>
> jim <> wrote:
> >    while $not_finished
> >       do  dd bs=$BS count=1
> > The problem is that dd never transfers a full block; $BS is about
> > 400000, and each time through the loop, dd only transfers about 73xxx
> > bytes, and sometimes less.
> Is $BS a multiple of something? If so, maybe it would help to do something
> like:
> do  dd bs=`echo $BS/8 | bc` count=8

thanks; I actually thought of something similar after I posted here;
but I really want a method that doesn't depend
on my guessing correctly a number (8 in your example) that _might_
make the problem go away, but also might not.
It looks as if the right thing to do is to restructure the program so
as to eliminate the race/timimg issue, but it's not
clear to me how to do that.  What I'm trying to do is, even more
               copy the next $BS bytes
               generate new label and insert it into data stream

The only reason for the pipe is to not have to restart the
decompression (and then skip) for each new block of data.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]