[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Netstat script?



On Sun, Feb 20, 2005 at 01:08:02AM -0600, SigmaX wrote:
> I know nothing about scripting, but I want to write/obtain a script that 
> displays the results of the command "netstat -a | grep tcp", then clears 
> the screen and does so again a few seconds later.  Else I just need a 
> program that does something similar in the console, so I can view it 
> over SSH.

How about:

watch "netstat -a | grep tcp"

It defaults to 2 seconds; 'man watch' for more details.

Richard



Reply to: