Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Jul 2010 01:44:00 -0500 (CDT)
From:      Robert Bonomi <bonomi@mail.r-bonomi.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: slow down dd - how?
Message-ID:  <201007090644.o696i0QK028217@mail.r-bonomi.com>

next in thread | raw e-mail | index | archive | help
> Date: Fri, 9 Jul 2010 02:32:18 +0200
> From: Thomas <fwd@gothschlampen.com>
> Cc: FreeBSD Mailing list <freebsd-questions@freebsd.org>
> Subject: Re: slow down dd - how?
>
> On Thu, Jul 08, 2010 at 05:50:52PM +0200, Jozsi Avadkan wrote:
>
> Hi,
>
> > How can I slow down dd?
> > 
>
> you could use some creative shellscripting (probably in addition to idprio):
>
> dd if=/dev/zero bs=1024k | ( dd bs=1024k count=10; sleep 3 ) | dd bs=1024k of=/dev/somewhere
>
> This pauses for 3 seconds for every 10MB written. ...

I must be missing something. 

Doesn't that "dd ... ; sleep" in the sub-shell need to be in a _loop_ of some 
sort?

I would expect the dd in the sub-shell to _exit_ after the first 10mb, 
whereupon the subshell would exit after the 3 second sleep, whereupon 
'somebody" is going to holler about a 'broken pipe'.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007090644.o696i0QK028217>