Search code examples
linuxunixcommanddd

How to use dd Linux command to download a file from the internet?


Ok, I know this might sound crazy but. Let's say I am logged in and work on the virtual machine on the server through SSH. I have a link and I want to download a file (1 GB) with dd command.

So how to do that?

For me it has to be something like this

dd if="www.speed.hetzner.de/1GB.bin"  of=~/dir bs=20

Please tell me, I was looking everywhere and can't find the answer.


Solution

  • If you actually want to use dd for the output processing (writing an ISO file to a block device for example), you can pipe curl into dd:

    curl 'http://address.for/your.iso' | dd conv=noerror,sync bs=4M of=/dev/sdX