How to unzip and dd a disk image to an SD Card with a single command?
Use unzip -p
:
unzip -p 2015-11-21-raspbian-jessie.zip 2015-11-21-raspbian-jessie.img | dd of=/dev/sdb bs=1M
After a bit of struggling with the former solution:
unzip -p ~/Downloads/2020-02-05-raspbian-buster-lite.zip | sudo dd of=/dev/disk2 bs=1m
or, if you want to see the progress and you have installed pv
:
unzip -p ~/Downloads/2020-02-05-raspbian-buster-lite.zip | pv | sudo dd of=/dev/disk2 bs=1m