查看GNU/Linux Tips的源代码
←
GNU/Linux Tips
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
== netcat == === 简单web服务器 === web 查看系统状态 (TOP): <source lang=bash> #!/bin/bash top -b -n 1 > /tmp/top.txt app = "nc -l 996" count=1; while [ count>0 ] do pn = `ps -wef|grep "${app}" |grep -v grep |grep " 1 "|wc -l` echo $pn if test $pn -lt 1 then top -b -n 1 >/tmp/top.txt nc -l 996 </tmp/top.txt fi done </source> <br><br> === 传送文件 === <source lang=bash> server: nc -v -l -p 1234 > 1.txt client: nc -v -n 192.168.0.1 1234 < 1.txt </source> <source lang=bash> server: $ cat backup.iso | nc -l 3333 client: $ nc 192.168.0.1 3333 > backup.iso </source> Show the progress of the data transfer: <source lang=bash> server: $ cat backup.iso | pv -b | nc -l 3333 client: $ nc 192.168.0.1 3333 | pv -b o> backup.iso </source> <br><br> === Other === <source lang=bash> S: $ dd if=/dev/hdb5 | gzip -9 | nc -l 3333 C: $ nc 192.168.0.1 3333 | pv -b > myhdb5partition.img.gz S: $ tar -czf - /etc/ | nc -l 3333 C: $ nc 192.168.0.1 3333 | pv -b > mybackup.tar.gz </source> <br><br>
返回到
GNU/Linux Tips
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面