Questions about the dd command

Dan Farrell dan at
Sun Mar 2 02:18:36 UTC 2008

On Fri, 29 Feb 2008 14:24:55 -0700
Karl Larsen <k5di at> wrote:

> elmo wrote:
> > I've spent literally hours trying to find direct answers on the
> > dozens of websites that discuss 'dd'
> > but the couldn't find what I wanted.
> >
> > A few questions about the ' dd ' command:
> >
> >   For example:     sudo dd if=/dev/sda2 of=/dev/sdb2 bs=1440
> >
> >   1. Which is preferrable;    execute the command from an installed
> >        ubuntu (/dev/sda2) or from a ubuntu CD?

make sure you have the same partition and unit size, elmo!  for more
info, see my write-up on the subject :  Applicable to any system, of

>     There is no point to using dd from a CD-Rom. That is silly.

No, it's not at all silly.  Elmo, please look closely at the other
responses to see why.  In short: data consistency!  
> >   2. How do you  modify the example  to show the data as it is
> > being copied? 

it's possible in many ways; for one, using tee could do it.  

> >      Would this have a drastic effect on how long it takes to
> > complete the copy
> >       compared to just watching a blinking cursor?

YES!!! I would expect that it would slow things down significantly.  
My initial testing shows 1.1MB/S transfer rate 
for `dd if=/dev/hda1` (outputs to terminal) and almost 50MB/S if I send
it to /dev/null.  Translation: even an X terminal can only go about 1M
characters a second.  
>     There is no way I know to see what is happening.

'what's happening' can be seen with USR1 signal, as explained above.
The probably easiest incantation is:
$ killall -USR1 dd

incidentally, HUP will terminate dd!  Don't use HUP!

> >   3.  What effect on the does the ' bs = ' number have on
> >       the time to complete the copy or the accuracy of the copy?
> > Is there a
> >       default number if the the bs=    is omitted from the command?
> >
> > 	If you do not use a bs= it uses the default which is dead
> > slow. I use bs=10000 and it is much quicker. 

 Elmo, I recommend you use the block size of your hard disks.  

>     Suggest you read man dd where all these things come from.

the man pages aren't always the cornucopia of information people tout
them as - not that I don't read them all the time.  Many appear to be
moving towards gnu info.  

More information about the ubuntu-users mailing list