Is there some easy way in linux to listen for data on network and save them to a text file?
Thank you.
Netcat is your friend here.
nc -l localhost 10000 > log.txt
Netcat will listen for a connection on port 10000, redirect anything received to log.txt.
Also available is TCPDump.
sudo tcpdump -i eth0 -vvvvtttAXns 1500 'port 10000'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With