Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted
$ 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
share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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