I want to use nc
as a simple TCP/IP server. So far I run it using:
$ nc -k -l 3000 > temp.tmp
This works, but writes all the re
Omit the -k
and run it in a loop:
n=0
while nc -l 3000 > "$n".txt ; do
n=$((n+1))
done
On the receiver:
$ nc -p 3000 -l | tar -x
On the sender:
$ tar -c * | nc <ip_address> 3000
I think Cronolog can help in this case
-p option you can determine the period option
Also the filewatcher utility "incron" can be used which will check logs to one file & can split to some other files