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:
Linux version:
Recieve:
netcat -l -p 1234 | pv | tar x
Send:
tar cf - * | pv | netcat [ip] 1234
BSD version:
Recieve:
nc -l 1234 | tar -xpf -
Send:
tar -cf - * | nc [ip] 1234
2 Responses to some usefull commands to transfer files via tar & netcat