watch 命令 Linux下很有用 比如 配合 netstat 查看 tcp以及一些端口活动 watch -n 1 netstat -ant
2011-04-23 14:35
756 查看
今天复习一些TCP传输的知识,用watch -n 1 netstat -ant 然后刷新一个页面,看看,很有意思
一.watch作用
可以周期性的,重复的查看命令的输出结果
watch - execute a program periodically, showing output fullscreen
二.watch参数
Usage: watch [-dhntv] [--differences[=cumulative]] [--help] [--interval=<n>] [--no-title] [--version] <command>
-d, --differences[=cumulative] highlight changes between updates
(cumulative means highlighting is cumulative)
-h, --help print a summary of the options
-n, --interval=<seconds> 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
一.watch作用
可以周期性的,重复的查看命令的输出结果
watch - execute a program periodically, showing output fullscreen
二.watch参数
Usage: watch [-dhntv] [--differences[=cumulative]] [--help] [--interval=<n>] [--no-title] [--version] <command>
-d, --differences[=cumulative] highlight changes between updates
(cumulative means highlighting is cumulative)
-h, --help print a summary of the options
-n, --interval=<seconds> 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
相关文章推荐
- 在Linux和Window下如何查看一个端口是否监听以及被哪个进程监听命令
- Linux下查看已登录用户以及pkill强制活动用户退出命令
- 查看Linux正在监听端口命令 netstat -nltp
- Linux_Linux命令_netstat_查看端口的占用情况
- Linux系统目录结构以及文件查看cat命令的一些小细节
- Linux端口以及防火墙端口的查看命令
- linux 中 查看TCP(Tomcat)端口被占用情况并杀死命令
- Linux查看系统信息的一些命令以及查看已安装软件包的命令
- Netstat -tln 命令是Linux查看端口使用情况
- 在GNU/Linux中查看端口占用情况的命令-lsof、netstat
- linux 一些很有用的命令以及命令组合
- linux下查看端口和服务的一些命令
- window下查看1099端口被哪个进程占用的命令(window下命令也类似linux啊,netstat -aon|findstr "1099)
- Linux端口以及防火墙端口的查看命令
- Linux 查看进程占用端口命令 netstat -tlnp|grep port
- Linux查看端口命令:netstat -tln
- 【Linux命令与工具】系统资源查看——free、uname、dmesg以及netstat
- windows下查看特定端口被哪个端口占用的命令(windows下命令类似linux:netstat -aon|findstr "端口号")
- Linux端口以及防火墙端口的查看命令
- 菜鸟学习linux笔记与练习-----一些基本命令以及初级网络配置