1

I want to set up netcat in listening mode so that many clients can connect and they all receive the same file. The clients should be able to connect simultaneously...

Is this possible?

4
$ nc --listen --keep-open --send-only --exec "/usr/bin/cat /path/to/myfile" 0.0.0.0 5800
$ nc 127.0.0.1 5800 > recvfile
2
  • This command sends the file only once. I'm using Ncat: Version 6.25 ( nmap.org/ncat ) – Zabuzzman Apr 29 '13 at 20:37
  • You're right. You can use the --exec option instead. – Spack Apr 29 '13 at 20:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.