Gregg's MOTD

Tips & Tricks that I've Encountered Over the Years...

Transfering Files Using netcat

June 05, 2023 — Gregg Szumowski

You can use netcat to transfer a file from one machine to another machine. On the receiving machine enter the following command:

$ netcat -l 12345 > file.txt or

$ netcat -l -p 12345 > file.pdf

Then, on the sending machine use this command:

$ netcat $MY_IP_ADDRESS 12345 < file.txt

Tags: cli, netcat, nc, motd