using 'dd' from one source to multiple destinations

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Mon Jan 24 19:44:43 UTC 2005


On Mon, Jan 24, 2005 at 05:10:57PM +0000, Robert Brockway wrote:
> What is wrong with this?
> 
> DISKS="sdb sdc sdd"
> for I in $DISKS
> do
> 	dd if=/dev/sda of=/dev$I &
> done
> 
> This is actually more typing than repeating the dd command manually.
> 
> One assumes the originating filesystem is not changing during the process.
> If it is (which would be undesirable) better alternatives exist, such as:
> 
> dd if=/dev/sda of=/dev/sdb
> dd if=/dev/sdb of=/dev/sdc
> dd if=/dev/sdc of=/dev/sdd

It takes 3 times longer than reading onces and writing all others in
parallel.

Lennart Sorensen
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list