Recently I wanted to transfer data over the local network. I had to make an image of a drive, so I used dd
.
To do this I used nc
to redirect stdin
and sdtout
as follows:
It’s important to set up the destination host first:
nc -l -p <port> > output.img
On the source host you start the transfer with
dd if=/dev/sda1 | nc <host> <port>
nc
is not limited to dd
, you can redirect any stream you want to.