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?

$ nc --listen --keep-open --send-only --exec "/usr/bin/cat /path/to/myfile" 5800
$ nc 5800 > recvfile
  • 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.