Re:Dd is not a disk writing tool (2015)
by sply on Sunday January 08, 2017 @09:57AM
(#13349887)
No, you should use
or
[ Parent
| on HN ]
Re:Dd is not a disk writing tool (2015)
by RJIb8RBYxzAMX9u on Sunday January 08, 2017 @10:29AM
(#13350061)
I was originally going to put that in my examples, but opted to leave it out, because with sh -c you have to think about escaping special characters. Most of the time it doesn't matter, but when running commands as root you ought to be absolutely sure.
What about using a here-doc (as in http://stackoverflow.com/a/16514624/2954547)?
sudo sh <<EOF
cat foobar.img > /dev/sdi
EOF