tcping在linux下tar包 TCPing for linux工具是一个在Linux系统下使用TCP协议测试端口开放情况的小工具
- o$ ?* H) E; [: ~* H7 e
. V( J) {/ D! D参数: tcping [-q] [-t timeout_sec] [-utimeout_usec] <ip addr> <port> E& L1 D+ a& }+ N
5 c/ y( d1 y, o& O-q : quiet mode, do not output anything (except error messages)
. Y' E- Y8 s; l D& D-t : timeout in seconds
) R, B1 I. w! G6 ?# n-u : timeout in microseconds& _9 ^* h4 C- E) {' J
解压缩,可以看到解压后有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 8 x; s$ R, z/ ^' R+ s6 Q
-rw-r--r--. 1 3706 3700 4560 Dec 4 2008 tcping.c 将tcping拷贝到路径/usr/bin下面
; v# r- N+ S1 f% s! ]) F; ^# X4 x- J[root@localhost tcping-1.3.5]# cp tcping /usr/bin/ [root@localhost tcping-1.3.5]# tcping
Y- l- d" Q! E9 a! E/ Berror: Usage: tcping [-q] [-t timeout_sec] [-u timeout_usec] <host> <port> " W+ x, U- Y4 s
2 |/ }; i# X4 [- v- h2 S4 }9 `% q1 C u6 y. c& Y
|