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.

  • 2
    For which reasons? – user123456 Oct 8 '16 at 15:13
  • 1
    @RuiFRibeiro [citation needed] ;-) – Stephen Kitt Oct 8 '16 at 16:38
  • You're burning a USB stick? – Jeff Schaller Oct 8 '16 at 17:09
  • bah, thought I read burning a DVD over an USB no idea why. – Rui F Ribeiro Oct 8 '16 at 18:56

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...)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.