-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paulo Brito wrote:
> Thanks for de tips about top posting. I"ll remember
> 
> Michael, -w option dont make nc returns if a conection is already
> stablished.
> 
> I've tried this: nc -l -p 5558 -c bash. And it works! I think the big
> probleam is that tail doesn't connect his input stream to the data
> provided by nc, so it doesn't get informed when the connection comes
> down. As you said, tail -f never returns. Bash returns, if required. But
> nc would kill the -c process when the connection doesn't exists
> anymore... it doesn't make sense keep it running.
> 
> I'm going to try another solutions for what I want... maybe xinetd...
> 
> Thanks Michael and you all.

If you want to just what's changed in the log file since the last time
you connected, look at the package logtail.

For example you might run this command:

while :; do nc -l -p 5558 -c "logtail /var/log/syslog"; done

This would have nc exit when it's done dumping /var/log/syslog and the
next time someone connects it should pick up where it left off.

Regards,
Tod Detre

- --
Pantek, Inc. - http://www.pantek.com/ - i...@pantek.com
1-877-LINUX-FIX - Expert Open Source Technical Support
2008 Inductee to the prestigious Weatherhead 100
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmUpXkACgkQBp/fZcDt4Jv7+ACg0EWa2ZBuk0krUtCuPdplxiVr
ooEAn2QaMwhJ0MyIlXlI8B1CxWYnvfbW
=6dNT
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to