How can I transfer an .iso file to an USB in parallel to the download of this file so that downloaded data gets directly on my USB without passing through my hard drive.
Asked
Active
Viewed 3,548 times
5
user123456
- 4,758
- 11
- 52
- 78
-
2For which reasons? – user123456 Oct 08 '16 at 15:13
-
1@RuiFRibeiro [citation needed] ;-) – Stephen Kitt Oct 08 '16 at 16:38
-
You're burning a USB stick? – Jeff Schaller Oct 08 '16 at 17:09
-
bah, thought I read burning a DVD over an USB no idea why. – Rui F Ribeiro Oct 08 '16 at 18:56
1 Answers
11
I wouldn't try it on a CD (although it might well be that my old buffering fears are outdated), but it works fine on a USB key; for example:
curl -L http://cdimage.debian.org/debian-cd/8.6.0/amd64/iso-cd/debian-8.6.0-amd64-netinst.iso | sudo dd of=/dev/sdf
downloads the current Debian network installer and writes it to the sdf key.
This works because dd reads by default from its standard input, if no if parameter is given. The -L parameter to curl tells it to follow redirections.
In fact there's no need to use dd; as root,
curl -L http://cdimage.debian.org/debian-cd/8.6.0/amd64/iso-cd/debian-8.6.0-amd64-netinst.iso > /dev/sdf
works fine too.
(Make sure you get the device right! You can easily destroy the wrong drive with this kind of command...)
Stephen Kitt
- 411,918
- 54
- 1,065
- 1,164