今天复习一些TCP传输的知识,用watch -n 1 netstat -ant 然后刷新一个页面,看看,很有意思
一.watch作用
可以周期性的,重复的查看命令的输出结果
watch - execute a program periodically, showing output fullscreen
二.watch参数
Usage: watch [-dhntv] [--differences[=cumulative]] [--help] [--interval=] [--no-title] [--version]
-d, --differences[=cumulative] highlight changes between updates
(cumulative means highlighting is cumulative)
-h, --help print a summary of the options
-n, --interval= seconds to wait between updates
-v, --version print the version number
-t, --no-title turns off showing the header
-d 比较不同 ,高亮显示
-h help
-v 版本
-t 关闭header
具体参数,可以自己试试
三.具体应用,查看TCP连接的端口活动,进程状态(间隔1秒)
先执行一下命令,然后刷新一次browser,然后就可以看看终端的输出结果了
watch -n 1 netstat -ant
声明:本文档可以随意更改,但必须署名原作者
作者:凤凰舞者 qq:578989855