11 January 2014

Run a Linux command repeatedly

If you would like to issue a Linux command every X second, "watch" command is the solution.

Example:
Issuing netstat command every 2 seconds:

# watch -n2 "netstat -an|head -25"




No comments:

Post a Comment