netcat (nc) is a linux command that can create raw TCP/UDP sockets and send data through them. Pretty cool!
🔹️ nc [options] hostname port
Use netcat -t -l - 50555 < file.txt > /dev/null to be a SERVER and serve file.txt with TCP on port 50555.
Then use netcat IPADDDR 50555 > file_copy.txt to be a CLIENT and receive whatever IPADDR is serving at 50555 and save it as file_copy.txt
Netcat has three modes: connect, listen and tunnel.