易陆发现互联网技术论坛

 找回密码
 开始注册
查看: 3567|回复: 1
收起左侧

tcping在linux下tar包

[复制链接]
发表于 2019-4-1 11:03:29 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?开始注册

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 U

error: 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

tcping-1.3.5-1.tar.gz

9.9 KB, 下载次数: 0

售价: 3 金钱  [记录]  [购买]

 楼主| 发表于 2023-11-23 18:41:15 | 显示全部楼层
也可以使用yum 安装:
$ k. z1 w, q. E: g# yum install -y tcping
- s% @7 N  Z) p7 L5 dLoaded plugins: fastestmirror
) F9 y0 \8 ~  E8 mLoading mirror speeds from cached hostfile
" x- w: F; q. z7 z * base: ftp.sjtu.edu.cn
  C, G% T( n, k$ A6 t; a3 S- ~. F* I * epel: mirror.nyist.edu.cn, g' n: S" C; q9 L4 M5 R; ]
* extras: ftp.sjtu.edu.cn! P# ^8 r; J/ t) z/ N9 C5 L
* updates: ftp.sjtu.edu.cn
1 c/ T# l# x. Z! Z! a4 T0 Q, WResolving Dependencies
4 F  u, `% g# P  a0 [( l--> Running transaction check
7 o5 w) @8 H# L1 H5 d. R---> Package tcping.x86_64 0:1.3.5-19.el7 will be installed# F0 Y2 o, c# K( u3 O" ?! S9 f* L
--> Finished Dependency Resolution* ^5 d  ?! o2 l3 y) `. }

: b- J5 ]7 |" eDependencies Resolved! K7 L* [8 L  h6 }. ^% d& W7 T

8 o4 V' B; G3 C0 I6 u4 e==================================================================================================================================================================================================================! a6 {6 c* q; a. i1 C8 Z9 V4 n% |( D
Package                                          Arch                                             Version                                                   Repository                                      Size
1 o! B1 p/ V3 ?9 t' G: \0 ?; e- s==================================================================================================================================================================================================================
" h8 J, L9 d: d$ ~9 b6 dInstalling:9 U( \9 \. l8 V% ]
tcping                                           x86_64                                           1.3.5-19.el7                                              epel                                            15 k1 o5 g, [0 ^) y  d9 Y: w( c  ]1 G8 W

/ S; `6 A9 w- h" H0 \1 wTransaction Summary
- `7 H3 t* Z7 T! k# M5 F4 g& }==================================================================================================================================================================================================================$ k4 p( Y# @" F+ T# N( |% @6 T* B
Install  1 Package) i, y2 W, p/ D! s+ d( [

8 {( m; ~, w2 C% R: L( l4 w. W2 RTotal download size: 15 k
3 f1 W9 i0 N  VInstalled size: 20 k
4 a) T. t( X# c4 P8 G# ^' nDownloading packages:
! k/ d8 N& q; @6 Dtcping-1.3.5-19.el7.x86_64.rpm                                                                                                                                                             |  15 kB  00:00:00     + O. d4 H: w- H# W1 C
Running transaction check8 K/ I2 j) o* o8 Z1 f( b) x+ q
Running transaction test
) V3 \) _; ^' n4 d# a- V) r9 c' oTransaction test succeeded
2 K* ~1 o9 |- d8 JRunning transaction
7 j' t3 D' b* @2 z) O  Installing : tcping-1.3.5-19.el7.x86_64                                                                                                                                                                     1/1 # C" L6 n0 _8 N
  Verifying  : tcping-1.3.5-19.el7.x86_64                                                                                                                                                                     1/1
4 A) X7 `/ [3 X# f! c
4 ~2 c  w: b$ y& `Installed:
. Z6 Z% v* k+ }. e2 K  tcping.x86_64 0:1.3.5-19.el7                                                                                                                                                                                      ^! _* c! t  m& H

% G* H4 K/ h2 p( X) N  pComplete!
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

北京云银创陇科技有限公司以云计算运维,代码开发

QQ|返回首页|Archiver|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )点击这里给我发消息

GMT+8, 2026-4-8 21:31 , Processed in 0.049578 second(s), 27 queries .

Powered by Discuz! X3.4 Licensed

© 2012-2025 Discuz! Team.

快速回复 返回顶部 返回列表