linux查看活动的端口,watch 命令 Linux下很有用 比如 配合 netstat 查看 tcp以及一些端口活动 watch -n 1 netstat -ant...

今天复习一些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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值