Le dimanche 03 mai 2009 C  21:58 +0000, Stuart Henderson a C)crit :
> On 2009-05-03, David <dunnoseriou...@gmail.com> wrote:
> > Le dimanche 03 mai 2009 C  00:52 -0400, Daniel Ouellet a C)crit :
> >
> > [...]
> >> Then I did the image of the drive from the external broken one to the 
> >> new clean internal one.
> >> 
> >> dd if=/dev/rsd1c of=/dev/rwd0c bs=1m
> >> 
> >> And let that go. Took for ever and I had no clue of progress.
> >
> >
> > You can use Pipe Viewer (sysutils/pv) to get progress information.
> >
> >
> 
> it's slower that way. reading from disk and outputting to /dev/null:
> 
> - inside one dd process (dd if=foo of=bar)
>     0m32.33s real     0m0.24s user     0m9.42s system
> 
> - dd if=foo | dd of=bar
>     0m39.27s real     0m0.55s user     0m14.96s system
> 
> - dd if=foo | pv | dd of=bar
>     0m54.14s real     0m1.86s user     0m23.98s system
> 

Quick test on my laptop running OpenBSD.

Imaging 500M of wd0j to a file on wd0a.

dd if=/dev/wd0j of=./junk bs=1m count=500
72.312 secs

dd if=/dev/wd0j bs=1m count=500|dd of=./junk bs=1m 
72.710 secs

I add some options to pv in order to get ftp-like output

dd if=/dev/wd0j bs=1m count=500|pv -pts500m |dd of=./junk bs=1m 
72.830 secs

Anyway it's just an occasion to discover a tool that may easily give you
feedback while working with pipes.

Reply via email to