dd: write to multiple disks?

Clash Royale CLAN TAG#URR8PPP
up vote
16
down vote
favorite
I have 2 exactly same formatted, same size and same brand SD-cards.
I would like to dd image to /dev/disk2 and to /dev/disk3 at the same time.
Pseudocode
sudo dd bs=1m if=/Users/masi/2016-05-10-raspbian-jessie.img of=/dev/disk2,/dev/disk3
How can you dd from one input to many output SDs?
files dd output
add a comment |Â
up vote
16
down vote
favorite
I have 2 exactly same formatted, same size and same brand SD-cards.
I would like to dd image to /dev/disk2 and to /dev/disk3 at the same time.
Pseudocode
sudo dd bs=1m if=/Users/masi/2016-05-10-raspbian-jessie.img of=/dev/disk2,/dev/disk3
How can you dd from one input to many output SDs?
files dd output
What's the goal here? Performance? If yes remember the data you read will be cached. So the 2nd dd will you data from your bcache instead of reading (of course you need some free RAM).
â KWubbufetowicz
May 20 '16 at 15:42
2
My simplistic test with GNU coreutils dd... of=one of=twodid not produce two outputs. May need twoddcommands. I don't see wording in posix for dd to allow for multipleof's.
â Jeff Schaller
May 20 '16 at 15:46
@KWubbufetowicz I have 8GB RAM. Possible to get 32GB. Speed is my goal because I have 5 SDs.
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 15:53
add a comment |Â
up vote
16
down vote
favorite
up vote
16
down vote
favorite
I have 2 exactly same formatted, same size and same brand SD-cards.
I would like to dd image to /dev/disk2 and to /dev/disk3 at the same time.
Pseudocode
sudo dd bs=1m if=/Users/masi/2016-05-10-raspbian-jessie.img of=/dev/disk2,/dev/disk3
How can you dd from one input to many output SDs?
files dd output
I have 2 exactly same formatted, same size and same brand SD-cards.
I would like to dd image to /dev/disk2 and to /dev/disk3 at the same time.
Pseudocode
sudo dd bs=1m if=/Users/masi/2016-05-10-raspbian-jessie.img of=/dev/disk2,/dev/disk3
How can you dd from one input to many output SDs?
files dd output
files dd output
edited May 20 '16 at 16:21
don_crissti
48.4k15129158
48.4k15129158
asked May 20 '16 at 15:22
Léo Léopold Hertz ì¤ÂìÂÂ
9731144108
9731144108
What's the goal here? Performance? If yes remember the data you read will be cached. So the 2nd dd will you data from your bcache instead of reading (of course you need some free RAM).
â KWubbufetowicz
May 20 '16 at 15:42
2
My simplistic test with GNU coreutils dd... of=one of=twodid not produce two outputs. May need twoddcommands. I don't see wording in posix for dd to allow for multipleof's.
â Jeff Schaller
May 20 '16 at 15:46
@KWubbufetowicz I have 8GB RAM. Possible to get 32GB. Speed is my goal because I have 5 SDs.
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 15:53
add a comment |Â
What's the goal here? Performance? If yes remember the data you read will be cached. So the 2nd dd will you data from your bcache instead of reading (of course you need some free RAM).
â KWubbufetowicz
May 20 '16 at 15:42
2
My simplistic test with GNU coreutils dd... of=one of=twodid not produce two outputs. May need twoddcommands. I don't see wording in posix for dd to allow for multipleof's.
â Jeff Schaller
May 20 '16 at 15:46
@KWubbufetowicz I have 8GB RAM. Possible to get 32GB. Speed is my goal because I have 5 SDs.
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 15:53
What's the goal here? Performance? If yes remember the data you read will be cached. So the 2nd dd will you data from your bcache instead of reading (of course you need some free RAM).
â KWubbufetowicz
May 20 '16 at 15:42
What's the goal here? Performance? If yes remember the data you read will be cached. So the 2nd dd will you data from your bcache instead of reading (of course you need some free RAM).
â KWubbufetowicz
May 20 '16 at 15:42
2
2
My simplistic test with GNU coreutils dd
... of=one of=two did not produce two outputs. May need two dd commands. I don't see wording in posix for dd to allow for multiple of's.â Jeff Schaller
May 20 '16 at 15:46
My simplistic test with GNU coreutils dd
... of=one of=two did not produce two outputs. May need two dd commands. I don't see wording in posix for dd to allow for multiple of's.â Jeff Schaller
May 20 '16 at 15:46
@KWubbufetowicz I have 8GB RAM. Possible to get 32GB. Speed is my goal because I have 5 SDs.
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 15:53
@KWubbufetowicz I have 8GB RAM. Possible to get 32GB. Speed is my goal because I have 5 SDs.
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 15:53
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
19
down vote
accepted
Borrowing from don_crissti's answer using
tee, but withoutddor bashisms:sudo tee /dev/disk2 /dev/disk3 > /dev/disk4 < masi.imgUsing
peefrom Debian's moreutils package:sudo dd if=masi.img |
pee "dd of=/dev/disk2" "dd of=/dev/disk3" "dd of=/dev/disk4"With
bash,ksh, orzsh, that can be abbreviated to:sudo dd if=masi.img | pee "dd of=/dev/disk"2..4Or even, (if there's no need for
dd's useful functions):sudo pee "dd of=/dev/disk"2..4 < masi.imgpeeis useful; one may, if required, include, (within each quoted argument), additional distinctddoptions, and even other pipes and filters, individually tailored to each output device.
With either method the number of output disks can be extended indefinitely.
1
Using dd for this isn't necessary. A lot of people believe it's necessary because its usage, specific to copying to or from disk images, is "fossilized" in tutorials written back in the 90s and copied by people who didn't know why. It was used back then to work around a glitch in cp.
â Random832
May 20 '16 at 17:26
@Random832 It is necessary because it is more stable thancp. Try many formats and different allocation sizes. I have not found enough stablecpfor the work. Please, correct me as an answer here if you can argumentate howcpis enough stable.
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 17:48
@Masi It is rarely necessary to explicitly select a format (what do you even mean by "format") and allocation size (you mean the block size?) for the common purpose of writing a disk image to a disk or reading a disk into a disk image. The reason dd became commonly used for this purpose was because of a bug in cp (GNU cp on Linux specifically) in the early 90s that caused it to skip copying blocks that were all-zero-bytes.
â Random832
May 20 '16 at 18:23
7
Bug incpin the 90s?ddis 20 years older than that. The main reason for usingddwas that many devices, especially tape drives, needed to be read/written in fixed block sizes, which is whyddhasbs,ibsandobsparameters, and it was the only program that could ensure correct block sizes.
â Guntram Blohm
May 20 '16 at 18:57
1
@Gilles, here tee is indeed preferable to pee, (but dcfldd is best). Still, pee is useful; one may, if required, include, (within each quoted argument), additional 'dd' options, and even other pipes and filters, individually tailored to each output device.
â agc
May 21 '16 at 3:49
 |Â
show 3 more comments
up vote
18
down vote
You could try dcfldd
It's an enhanced version of gnu dd and it can output to multiple files or disks at the same time:
dcfldd if=masi.img of=/dev/disk2 of=/dev/disk3 of=/dev/disk4
Can you explain your first command. Why pipe only before the lastdd? How does the location of the pipe change with fourdd?
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 16:24
3
dcflddis the fastest, maybe that should be the first choice.
â agc
May 20 '16 at 16:29
add a comment |Â
up vote
3
down vote
Also this is possible with tee and process substitution:
dd if=/dev/sda | tee >(dd of=/dev/sdb) >(dd of=/dev/sdc) | dd of=/dev/sdd
Can you explain process substitute? How is your answer different from agc's one?
â Léo Léopold Hertz ì¤ÂìÂÂ
Dec 22 '17 at 20:46
yeah sure:process substitutionis used when you need to pipe the stdout of one command to multiple commands. Using a simple pipe will let you pipe to just one command. My answer is achieving the same result as agc's, but in a different way :) Also I never usedpeebefore, as I have theteecommand on my system.
â chevallier
Dec 22 '17 at 21:44
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
19
down vote
accepted
Borrowing from don_crissti's answer using
tee, but withoutddor bashisms:sudo tee /dev/disk2 /dev/disk3 > /dev/disk4 < masi.imgUsing
peefrom Debian's moreutils package:sudo dd if=masi.img |
pee "dd of=/dev/disk2" "dd of=/dev/disk3" "dd of=/dev/disk4"With
bash,ksh, orzsh, that can be abbreviated to:sudo dd if=masi.img | pee "dd of=/dev/disk"2..4Or even, (if there's no need for
dd's useful functions):sudo pee "dd of=/dev/disk"2..4 < masi.imgpeeis useful; one may, if required, include, (within each quoted argument), additional distinctddoptions, and even other pipes and filters, individually tailored to each output device.
With either method the number of output disks can be extended indefinitely.
1
Using dd for this isn't necessary. A lot of people believe it's necessary because its usage, specific to copying to or from disk images, is "fossilized" in tutorials written back in the 90s and copied by people who didn't know why. It was used back then to work around a glitch in cp.
â Random832
May 20 '16 at 17:26
@Random832 It is necessary because it is more stable thancp. Try many formats and different allocation sizes. I have not found enough stablecpfor the work. Please, correct me as an answer here if you can argumentate howcpis enough stable.
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 17:48
@Masi It is rarely necessary to explicitly select a format (what do you even mean by "format") and allocation size (you mean the block size?) for the common purpose of writing a disk image to a disk or reading a disk into a disk image. The reason dd became commonly used for this purpose was because of a bug in cp (GNU cp on Linux specifically) in the early 90s that caused it to skip copying blocks that were all-zero-bytes.
â Random832
May 20 '16 at 18:23
7
Bug incpin the 90s?ddis 20 years older than that. The main reason for usingddwas that many devices, especially tape drives, needed to be read/written in fixed block sizes, which is whyddhasbs,ibsandobsparameters, and it was the only program that could ensure correct block sizes.
â Guntram Blohm
May 20 '16 at 18:57
1
@Gilles, here tee is indeed preferable to pee, (but dcfldd is best). Still, pee is useful; one may, if required, include, (within each quoted argument), additional 'dd' options, and even other pipes and filters, individually tailored to each output device.
â agc
May 21 '16 at 3:49
 |Â
show 3 more comments
up vote
19
down vote
accepted
Borrowing from don_crissti's answer using
tee, but withoutddor bashisms:sudo tee /dev/disk2 /dev/disk3 > /dev/disk4 < masi.imgUsing
peefrom Debian's moreutils package:sudo dd if=masi.img |
pee "dd of=/dev/disk2" "dd of=/dev/disk3" "dd of=/dev/disk4"With
bash,ksh, orzsh, that can be abbreviated to:sudo dd if=masi.img | pee "dd of=/dev/disk"2..4Or even, (if there's no need for
dd's useful functions):sudo pee "dd of=/dev/disk"2..4 < masi.imgpeeis useful; one may, if required, include, (within each quoted argument), additional distinctddoptions, and even other pipes and filters, individually tailored to each output device.
With either method the number of output disks can be extended indefinitely.
1
Using dd for this isn't necessary. A lot of people believe it's necessary because its usage, specific to copying to or from disk images, is "fossilized" in tutorials written back in the 90s and copied by people who didn't know why. It was used back then to work around a glitch in cp.
â Random832
May 20 '16 at 17:26
@Random832 It is necessary because it is more stable thancp. Try many formats and different allocation sizes. I have not found enough stablecpfor the work. Please, correct me as an answer here if you can argumentate howcpis enough stable.
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 17:48
@Masi It is rarely necessary to explicitly select a format (what do you even mean by "format") and allocation size (you mean the block size?) for the common purpose of writing a disk image to a disk or reading a disk into a disk image. The reason dd became commonly used for this purpose was because of a bug in cp (GNU cp on Linux specifically) in the early 90s that caused it to skip copying blocks that were all-zero-bytes.
â Random832
May 20 '16 at 18:23
7
Bug incpin the 90s?ddis 20 years older than that. The main reason for usingddwas that many devices, especially tape drives, needed to be read/written in fixed block sizes, which is whyddhasbs,ibsandobsparameters, and it was the only program that could ensure correct block sizes.
â Guntram Blohm
May 20 '16 at 18:57
1
@Gilles, here tee is indeed preferable to pee, (but dcfldd is best). Still, pee is useful; one may, if required, include, (within each quoted argument), additional 'dd' options, and even other pipes and filters, individually tailored to each output device.
â agc
May 21 '16 at 3:49
 |Â
show 3 more comments
up vote
19
down vote
accepted
up vote
19
down vote
accepted
Borrowing from don_crissti's answer using
tee, but withoutddor bashisms:sudo tee /dev/disk2 /dev/disk3 > /dev/disk4 < masi.imgUsing
peefrom Debian's moreutils package:sudo dd if=masi.img |
pee "dd of=/dev/disk2" "dd of=/dev/disk3" "dd of=/dev/disk4"With
bash,ksh, orzsh, that can be abbreviated to:sudo dd if=masi.img | pee "dd of=/dev/disk"2..4Or even, (if there's no need for
dd's useful functions):sudo pee "dd of=/dev/disk"2..4 < masi.imgpeeis useful; one may, if required, include, (within each quoted argument), additional distinctddoptions, and even other pipes and filters, individually tailored to each output device.
With either method the number of output disks can be extended indefinitely.
Borrowing from don_crissti's answer using
tee, but withoutddor bashisms:sudo tee /dev/disk2 /dev/disk3 > /dev/disk4 < masi.imgUsing
peefrom Debian's moreutils package:sudo dd if=masi.img |
pee "dd of=/dev/disk2" "dd of=/dev/disk3" "dd of=/dev/disk4"With
bash,ksh, orzsh, that can be abbreviated to:sudo dd if=masi.img | pee "dd of=/dev/disk"2..4Or even, (if there's no need for
dd's useful functions):sudo pee "dd of=/dev/disk"2..4 < masi.imgpeeis useful; one may, if required, include, (within each quoted argument), additional distinctddoptions, and even other pipes and filters, individually tailored to each output device.
With either method the number of output disks can be extended indefinitely.
edited 1 hour ago
answered May 20 '16 at 16:27
agc
4,3831935
4,3831935
1
Using dd for this isn't necessary. A lot of people believe it's necessary because its usage, specific to copying to or from disk images, is "fossilized" in tutorials written back in the 90s and copied by people who didn't know why. It was used back then to work around a glitch in cp.
â Random832
May 20 '16 at 17:26
@Random832 It is necessary because it is more stable thancp. Try many formats and different allocation sizes. I have not found enough stablecpfor the work. Please, correct me as an answer here if you can argumentate howcpis enough stable.
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 17:48
@Masi It is rarely necessary to explicitly select a format (what do you even mean by "format") and allocation size (you mean the block size?) for the common purpose of writing a disk image to a disk or reading a disk into a disk image. The reason dd became commonly used for this purpose was because of a bug in cp (GNU cp on Linux specifically) in the early 90s that caused it to skip copying blocks that were all-zero-bytes.
â Random832
May 20 '16 at 18:23
7
Bug incpin the 90s?ddis 20 years older than that. The main reason for usingddwas that many devices, especially tape drives, needed to be read/written in fixed block sizes, which is whyddhasbs,ibsandobsparameters, and it was the only program that could ensure correct block sizes.
â Guntram Blohm
May 20 '16 at 18:57
1
@Gilles, here tee is indeed preferable to pee, (but dcfldd is best). Still, pee is useful; one may, if required, include, (within each quoted argument), additional 'dd' options, and even other pipes and filters, individually tailored to each output device.
â agc
May 21 '16 at 3:49
 |Â
show 3 more comments
1
Using dd for this isn't necessary. A lot of people believe it's necessary because its usage, specific to copying to or from disk images, is "fossilized" in tutorials written back in the 90s and copied by people who didn't know why. It was used back then to work around a glitch in cp.
â Random832
May 20 '16 at 17:26
@Random832 It is necessary because it is more stable thancp. Try many formats and different allocation sizes. I have not found enough stablecpfor the work. Please, correct me as an answer here if you can argumentate howcpis enough stable.
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 17:48
@Masi It is rarely necessary to explicitly select a format (what do you even mean by "format") and allocation size (you mean the block size?) for the common purpose of writing a disk image to a disk or reading a disk into a disk image. The reason dd became commonly used for this purpose was because of a bug in cp (GNU cp on Linux specifically) in the early 90s that caused it to skip copying blocks that were all-zero-bytes.
â Random832
May 20 '16 at 18:23
7
Bug incpin the 90s?ddis 20 years older than that. The main reason for usingddwas that many devices, especially tape drives, needed to be read/written in fixed block sizes, which is whyddhasbs,ibsandobsparameters, and it was the only program that could ensure correct block sizes.
â Guntram Blohm
May 20 '16 at 18:57
1
@Gilles, here tee is indeed preferable to pee, (but dcfldd is best). Still, pee is useful; one may, if required, include, (within each quoted argument), additional 'dd' options, and even other pipes and filters, individually tailored to each output device.
â agc
May 21 '16 at 3:49
1
1
Using dd for this isn't necessary. A lot of people believe it's necessary because its usage, specific to copying to or from disk images, is "fossilized" in tutorials written back in the 90s and copied by people who didn't know why. It was used back then to work around a glitch in cp.
â Random832
May 20 '16 at 17:26
Using dd for this isn't necessary. A lot of people believe it's necessary because its usage, specific to copying to or from disk images, is "fossilized" in tutorials written back in the 90s and copied by people who didn't know why. It was used back then to work around a glitch in cp.
â Random832
May 20 '16 at 17:26
@Random832 It is necessary because it is more stable than
cp. Try many formats and different allocation sizes. I have not found enough stable cp for the work. Please, correct me as an answer here if you can argumentate how cp is enough stable.â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 17:48
@Random832 It is necessary because it is more stable than
cp. Try many formats and different allocation sizes. I have not found enough stable cp for the work. Please, correct me as an answer here if you can argumentate how cp is enough stable.â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 17:48
@Masi It is rarely necessary to explicitly select a format (what do you even mean by "format") and allocation size (you mean the block size?) for the common purpose of writing a disk image to a disk or reading a disk into a disk image. The reason dd became commonly used for this purpose was because of a bug in cp (GNU cp on Linux specifically) in the early 90s that caused it to skip copying blocks that were all-zero-bytes.
â Random832
May 20 '16 at 18:23
@Masi It is rarely necessary to explicitly select a format (what do you even mean by "format") and allocation size (you mean the block size?) for the common purpose of writing a disk image to a disk or reading a disk into a disk image. The reason dd became commonly used for this purpose was because of a bug in cp (GNU cp on Linux specifically) in the early 90s that caused it to skip copying blocks that were all-zero-bytes.
â Random832
May 20 '16 at 18:23
7
7
Bug in
cp in the 90s? dd is 20 years older than that. The main reason for using dd was that many devices, especially tape drives, needed to be read/written in fixed block sizes, which is why dd has bs, ibs and obs parameters, and it was the only program that could ensure correct block sizes.â Guntram Blohm
May 20 '16 at 18:57
Bug in
cp in the 90s? dd is 20 years older than that. The main reason for using dd was that many devices, especially tape drives, needed to be read/written in fixed block sizes, which is why dd has bs, ibs and obs parameters, and it was the only program that could ensure correct block sizes.â Guntram Blohm
May 20 '16 at 18:57
1
1
@Gilles, here tee is indeed preferable to pee, (but dcfldd is best). Still, pee is useful; one may, if required, include, (within each quoted argument), additional 'dd' options, and even other pipes and filters, individually tailored to each output device.
â agc
May 21 '16 at 3:49
@Gilles, here tee is indeed preferable to pee, (but dcfldd is best). Still, pee is useful; one may, if required, include, (within each quoted argument), additional 'dd' options, and even other pipes and filters, individually tailored to each output device.
â agc
May 21 '16 at 3:49
 |Â
show 3 more comments
up vote
18
down vote
You could try dcfldd
It's an enhanced version of gnu dd and it can output to multiple files or disks at the same time:
dcfldd if=masi.img of=/dev/disk2 of=/dev/disk3 of=/dev/disk4
Can you explain your first command. Why pipe only before the lastdd? How does the location of the pipe change with fourdd?
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 16:24
3
dcflddis the fastest, maybe that should be the first choice.
â agc
May 20 '16 at 16:29
add a comment |Â
up vote
18
down vote
You could try dcfldd
It's an enhanced version of gnu dd and it can output to multiple files or disks at the same time:
dcfldd if=masi.img of=/dev/disk2 of=/dev/disk3 of=/dev/disk4
Can you explain your first command. Why pipe only before the lastdd? How does the location of the pipe change with fourdd?
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 16:24
3
dcflddis the fastest, maybe that should be the first choice.
â agc
May 20 '16 at 16:29
add a comment |Â
up vote
18
down vote
up vote
18
down vote
You could try dcfldd
It's an enhanced version of gnu dd and it can output to multiple files or disks at the same time:
dcfldd if=masi.img of=/dev/disk2 of=/dev/disk3 of=/dev/disk4
You could try dcfldd
It's an enhanced version of gnu dd and it can output to multiple files or disks at the same time:
dcfldd if=masi.img of=/dev/disk2 of=/dev/disk3 of=/dev/disk4
edited May 20 '16 at 23:16
answered May 20 '16 at 16:20
don_crissti
48.4k15129158
48.4k15129158
Can you explain your first command. Why pipe only before the lastdd? How does the location of the pipe change with fourdd?
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 16:24
3
dcflddis the fastest, maybe that should be the first choice.
â agc
May 20 '16 at 16:29
add a comment |Â
Can you explain your first command. Why pipe only before the lastdd? How does the location of the pipe change with fourdd?
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 16:24
3
dcflddis the fastest, maybe that should be the first choice.
â agc
May 20 '16 at 16:29
Can you explain your first command. Why pipe only before the last
dd? How does the location of the pipe change with four dd?â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 16:24
Can you explain your first command. Why pipe only before the last
dd? How does the location of the pipe change with four dd?â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 16:24
3
3
dcfldd is the fastest, maybe that should be the first choice.â agc
May 20 '16 at 16:29
dcfldd is the fastest, maybe that should be the first choice.â agc
May 20 '16 at 16:29
add a comment |Â
up vote
3
down vote
Also this is possible with tee and process substitution:
dd if=/dev/sda | tee >(dd of=/dev/sdb) >(dd of=/dev/sdc) | dd of=/dev/sdd
Can you explain process substitute? How is your answer different from agc's one?
â Léo Léopold Hertz ì¤ÂìÂÂ
Dec 22 '17 at 20:46
yeah sure:process substitutionis used when you need to pipe the stdout of one command to multiple commands. Using a simple pipe will let you pipe to just one command. My answer is achieving the same result as agc's, but in a different way :) Also I never usedpeebefore, as I have theteecommand on my system.
â chevallier
Dec 22 '17 at 21:44
add a comment |Â
up vote
3
down vote
Also this is possible with tee and process substitution:
dd if=/dev/sda | tee >(dd of=/dev/sdb) >(dd of=/dev/sdc) | dd of=/dev/sdd
Can you explain process substitute? How is your answer different from agc's one?
â Léo Léopold Hertz ì¤ÂìÂÂ
Dec 22 '17 at 20:46
yeah sure:process substitutionis used when you need to pipe the stdout of one command to multiple commands. Using a simple pipe will let you pipe to just one command. My answer is achieving the same result as agc's, but in a different way :) Also I never usedpeebefore, as I have theteecommand on my system.
â chevallier
Dec 22 '17 at 21:44
add a comment |Â
up vote
3
down vote
up vote
3
down vote
Also this is possible with tee and process substitution:
dd if=/dev/sda | tee >(dd of=/dev/sdb) >(dd of=/dev/sdc) | dd of=/dev/sdd
Also this is possible with tee and process substitution:
dd if=/dev/sda | tee >(dd of=/dev/sdb) >(dd of=/dev/sdc) | dd of=/dev/sdd
answered Dec 22 '17 at 18:23
chevallier
8791116
8791116
Can you explain process substitute? How is your answer different from agc's one?
â Léo Léopold Hertz ì¤ÂìÂÂ
Dec 22 '17 at 20:46
yeah sure:process substitutionis used when you need to pipe the stdout of one command to multiple commands. Using a simple pipe will let you pipe to just one command. My answer is achieving the same result as agc's, but in a different way :) Also I never usedpeebefore, as I have theteecommand on my system.
â chevallier
Dec 22 '17 at 21:44
add a comment |Â
Can you explain process substitute? How is your answer different from agc's one?
â Léo Léopold Hertz ì¤ÂìÂÂ
Dec 22 '17 at 20:46
yeah sure:process substitutionis used when you need to pipe the stdout of one command to multiple commands. Using a simple pipe will let you pipe to just one command. My answer is achieving the same result as agc's, but in a different way :) Also I never usedpeebefore, as I have theteecommand on my system.
â chevallier
Dec 22 '17 at 21:44
Can you explain process substitute? How is your answer different from agc's one?
â Léo Léopold Hertz ì¤ÂìÂÂ
Dec 22 '17 at 20:46
Can you explain process substitute? How is your answer different from agc's one?
â Léo Léopold Hertz ì¤ÂìÂÂ
Dec 22 '17 at 20:46
yeah sure:
process substitution is used when you need to pipe the stdout of one command to multiple commands. Using a simple pipe will let you pipe to just one command. My answer is achieving the same result as agc's, but in a different way :) Also I never used pee before, as I have the tee command on my system.â chevallier
Dec 22 '17 at 21:44
yeah sure:
process substitution is used when you need to pipe the stdout of one command to multiple commands. Using a simple pipe will let you pipe to just one command. My answer is achieving the same result as agc's, but in a different way :) Also I never used pee before, as I have the tee command on my system.â chevallier
Dec 22 '17 at 21:44
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f284480%2fdd-write-to-multiple-disks%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
What's the goal here? Performance? If yes remember the data you read will be cached. So the 2nd dd will you data from your bcache instead of reading (of course you need some free RAM).
â KWubbufetowicz
May 20 '16 at 15:42
2
My simplistic test with GNU coreutils dd
... of=one of=twodid not produce two outputs. May need twoddcommands. I don't see wording in posix for dd to allow for multipleof's.â Jeff Schaller
May 20 '16 at 15:46
@KWubbufetowicz I have 8GB RAM. Possible to get 32GB. Speed is my goal because I have 5 SDs.
â Léo Léopold Hertz ì¤ÂìÂÂ
May 20 '16 at 15:53