I recently needed to transfer some folders from one machine to an other via lan.
I could have used scp or rsync, but the cryptographic layer seems a kind of overhead to me, additonal the two pc’s weren’t the fastest. So netcat came into my mind, and I just wanted to share the commands i used (and keep them for a later use).
So here they are:
netcat -l -p 1234 | pv | tar x
tar cf - * | pv | netcat [ip] 1234
nc -l 1234 | tar -xpf -
tar -cf - * | nc [ip] 1234