马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
tcping在linux下tar包 TCPing for linux工具是一个在Linux系统下使用TCP协议测试端口开放情况的小工具/ x* B' A4 {+ X% Q% n; x1 Y) M
& l5 l4 s3 \* K) {& H$ d* y5 P参数: tcping [-q] [-t timeout_sec] [-utimeout_usec] <ip addr> <port>
/ D6 ^; _1 S/ r1 X/ }
2 a% |9 t0 m8 [) M" X" Y-q : quiet mode, do not output anything (except error messages)
( a; J4 ]7 J4 t2 a4 G-t : timeout in seconds
9 k3 I! Y/ D8 }, V-u : timeout in microseconds
, E( W9 j0 a2 U+ u4 o解压缩,可以看到解压后有4个文件,README中有作者给出的安装使用说明,有兴趣的可以详细读一下。 tar -xvzf tcping-1.3.5.tar.gz [root@localhost ~]# cd tcping-1.3.5 [root@localhost tcping-1.3.5]# ls LICENSE Makefile README tcping.c [root@localhost tcping-1.3.5]# README中作者给出需要使用make编译,部分linux版本有可能需要安装比较多的编译组件,这里.c文件我们也可以直接使用GCC编译生成执行文件tcping, [root@localhost tcping-1.3.5]# gcc -o tcping tcping.c [root@localhost tcping-1.3.5]# ll total 40 -rw-r--r--. 1 3706 3700 7639 Dec 4 2008 LICENSE -rw-r--r--. 1 3706 3700 1021 Dec 4 2008 Makefile -rw-r--r--. 1 3706 3700 1827 Dec 4 2008 README -rwxr-xr-x. 1 root root 13600 Apr 1 10:57 tcping
) t, k4 k: ?7 U-rw-r--r--. 1 3706 3700 4560 Dec 4 2008 tcping.c 将tcping拷贝到路径/usr/bin下面 ) N" e' o4 }! O& S( d- g) B7 H0 z, l
[root@localhost tcping-1.3.5]# cp tcping /usr/bin/ [root@localhost tcping-1.3.5]# tcping
A, B i$ m5 F- c( d1 }8 Uerror: Usage: tcping [-q] [-t timeout_sec] [-u timeout_usec] <host> <port>
; q' x0 |) R0 C- R
: B# d5 c/ v8 T, U. c1 l3 x1 `# [2 A4 l* s
|