Linux shell编程学习笔记66:ping命令 超详细的选项说明
0 前言
网络信息是电脑网络信息安全检查中的一块重要内容,Linux和基于Linux的操作系统,提供了很多的网络命令,今天我们研究最常用的ping命令。
1 ping命令 的功能、格式和选项说明
1.1 ping命令 的功能
简单来说, ping 命令 会使用 ICMP(Internet Control Message Protocol) 传输协议,向网络主机发出要求回应的信息,若网络主机的网络功能没有问题,就会回应该信息,从而得知该主机运作正常。
具体来说,ping 命令使用 ICMP 协议的强制ECHO_REQUEST数据报从主机或网关引出 ICMP ECHO_RESPONSE。ECHO_REQUEST数据报 (''pings'') 都有一个 IP 和 ICMP 标头,后跟一个结构体 timeval,然后是用于填充数据包的任意数量的 ''pad'' 字节。
ping 命令常用于检测 网络中的另一台主机或路由器是否可访问。
1.2 Linux中的ping命令支持ipV6吗?
- 在基于 Debian 的 Linux 发行版(包括 Ubuntu)上,您可以使用 ping6 命令强制 ping 使用 IPv6 而不是 IPv4。
- 在基于 Red Hat 的发行版(如 CentOS)和基于 Arch Linux 的发行版(如 Manjaro)上,使用带 -6 选项的 ping 命令来强制 IPv6。
1.3 Linux中的ping命令与Windows中的ping命令相同吗?
Linux中的ping命令与Windows中的ping命令在功能上可以说是相同的,但是两者在某些方面存在不同。例如,在默认情况下,Linux 下的ping会连续发送包,而Windows的ping命令 仅发送 4 个包。
Windows 中的ping命令格式如下:
C:\Users\purpleendurer>ping用法: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS][-r count] [-s count] [[-j host-list] | [-k host-list]][-w timeout] [-R] [-S srcaddr] [-c compartment] [-p][-4] [-6] target_name选项:-t Ping 指定的主机,直到停止。若要查看统计信息并继续操作,请键入 Ctrl+Break;若要停止,请键入 Ctrl+C。-a 将地址解析为主机名。-n count 要发送的回显请求数。-l size 发送缓冲区大小。-f 在数据包中设置“不分段”标记(仅适用于 IPv4)。-i TTL 生存时间。-v TOS 服务类型(仅适用于 IPv4。该设置已被弃用,对 IP 标头中的服务类型字段没有任何影响)。-r count 记录计数跃点的路由(仅适用于 IPv4)。-s count 计数跃点的时间戳(仅适用于 IPv4)。-j host-list 与主机列表一起使用的松散源路由(仅适用于 IPv4)。-k host-list 与主机列表一起使用的严格源路由(仅适用于 IPv4)。-w timeout 等待每次回复的超时时间(毫秒)。-R 同样使用路由标头测试反向路由(仅适用于 IPv6)。根据 RFC 5095,已弃用此路由标头。如果使用此标头,某些系统可能丢弃回显请求。-S srcaddr 要使用的源地址。-c compartment 路由隔离舱标识符。-p Ping Hyper-V 网络虚拟化提供程序地址。-4 强制使用 IPv4。-6 强制使用 IPv6。
1.4 ping命令的格式
与我们之前学的大多数linux命令不同,ping命令不支持--help选项。
我们可以使用ping 或 ping -?命令获取ping命令的格式信息。
[purpleendurer @ bash ~] ping
Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface][-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos][-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option][-w deadline] [-W timeout] [hop1 ...] destination
Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface][-l preload] [-m mark] [-M pmtudisc_option][-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize][-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline][-W timeout] destination
[purpleendurer @ bash ~] ping -?
Usage: ping [-aAbBdDfhLnOqrRUvV64] [-c count] [-i interval] [-I interface][-m mark] [-M pmtudisc_option] [-l preload] [-p pattern] [-Q tos][-s packetsize] [-S sndbuf] [-t ttl] [-T timestamp_option][-w deadline] [-W timeout] [hop1 ...] destination
Usage: ping -6 [-aAbBdDfhLnOqrRUvV] [-c count] [-i interval] [-I interface][-l preload] [-m mark] [-M pmtudisc_option][-N nodeinfo_option] [-p pattern] [-Q tclass] [-s packetsize][-S sndbuf] [-t ttl] [-T timestamp_option] [-w deadline][-W timeout] destination
[purpleendurer @ bash ~]
1.4.1支持ipV4的ping命令格式
ping [-aAbBdDfhLnOqrRUvV64] [-c 完成次数] [-i 间隔秒数] [-I 网络界面]
[-m mark] [-M pmtudisc_option] [-l 前置载入] [-p 范本样式] [-Q tos]
[-s 数据包大小] [-S sndbuf] [-t 存活数值] [-T 间间戳选项]
[-w 退出前等待秒数] [-W 执行前等待秒数] [hop1 ...] 目标主机名称或IP地址
1.4.2 支持ipV6的ping命令格式
ping -6 [-aAbBdDfhLnOqrRUvV] [-c 完成次数] [-i 间隔秒数] [-I 网络界面]
[-l 前置载入] [-m mark] [-M pmtudisc_option]
[-N nodeinfo_option] [-p 范本样式] [-Q tclass] [-s 数据包大小]
[-S sndbuf] [-t 存活数值] [-T 间间戳选项] [-w 退出前等待秒数]
[[-W 执行前等待秒数] 目标主机名称或IP地址
1.5 ping命令选项说明
ping命令的选项非常多,而且不同版本linux 提供的ping命令选项也不尽相同。
参数 | 描述 |
---|---|
-a | Audible ping. 可听到的ping |
-A |
|
-b | Allow pinging a broadcast address. 允许对广播地址进行ping |
-B |
|
-c count |
|
-d |
|
-F flow label |
|
-f |
|
-i interval |
|
-I interface address |
|
-l preload |
|
-L |
|
-n |
|
-p pattern |
|
-Q tos |
|
-q |
|
-R |
|
-r |
|
-s packetsize |
|
-S sndbuf |
|
-t ttl | Set the IP Time to Live. 设置IP的生存时间(TTL) |
-T timestamp option |
|
-M hint |
|
-U |
|
-v | Verbose output. 详细输出 |
-V | Show version and exit. 显示版本并退出 |
-w deadline |
|
-W timeout |
|
2 ping命令实例
2.1 ping -a g.cn
[purpleendurer @ bash ~] ping -a g.cn
PING g.cn (114.250.67.34) 56(84) bytes of data.
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=1 ttl=116 time=4.41 ms
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=2 ttl=116 time=4.36 ms
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=3 ttl=116 time=4.34 ms
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=4 ttl=116 time=4.38 ms
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=5 ttl=116 time=4.34 ms
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=6 ttl=116 time=4.36 ms
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=7 ttl=116 time=4.36 ms
^C
--- g.cn ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6007ms
rtt min/avg/max/mdev = 4.342/4.368/4.414/0.041 ms
[purpleendurer @ bash ~]
1.2 ping -A g.cn :自适应 ping g.cn
[purpleendurer @ bash ~] ping -A g.cn
PING g.cn (114.250.70.34) 56(84) bytes of data.
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=1 ttl=117 time=5.04 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=2 ttl=117 time=4.76 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=3 ttl=117 time=4.76 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=4 ttl=117 time=4.77 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=5 ttl=117 time=4.76 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=6 ttl=117 time=4.81 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=7 ttl=117 time=4.77 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=8 ttl=117 time=4.79 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=9 ttl=117 time=4.98 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=10 ttl=117 time=4.81 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=11 ttl=117 time=4.77 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=12 ttl=117 time=4.78 ms
^C
--- g.cn ping statistics ---
12 packets transmitted, 12 received, 0% packet loss, time 2210ms
rtt min/avg/max/mdev = 4.760/4.820/5.045/0.123 ms, ipg/ewma 200.918/4.862 ms
[purpleendurer @ bash ~]
可以看到,ping -A 返回个信息的速度明显快于 ping -a。
1.3 ping -b g.cn:使用广播方式ping g.cn
[purpleendurer @ bash ~] ping -b g.cn
PING g.cn (114.250.70.34) 56(84) bytes of data.
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=1 ttl=117 time=4.83 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=2 ttl=117 time=4.81 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=3 ttl=117 time=4.80 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=4 ttl=117 time=4.76 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=5 ttl=117 time=4.80 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=6 ttl=117 time=4.86 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=7 ttl=117 time=4.80 ms
^C
--- g.cn ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6011ms
rtt min/avg/max/mdev = 4.766/4.813/4.862/0.095 ms
[purpleendurer @ bash ~]
1.4 ping -B g.cn
[purpleendurer @ bash ~] ping -B g.cn
PING g.cn (114.250.67.34) from 172.25.109.185 : 56(84) bytes of data.
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=1 ttl=116 time=4.01 ms
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=2 ttl=116 time=4.36 ms
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=3 ttl=116 time=3.94 ms
^C
--- g.cn ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 3.943/4.108/4.364/0.197 ms
[purpleendurer @ bash ~]
1.5 ping -c 2 g.cn:向g.cn发送2个ICMP包
[purpleendurer @ bash ~] ping -c 2 g.cn
PING g.cn (114.250.70.34) 56(84) bytes of data.
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=1 ttl=117 time=4.82 ms
64 bytes from 114.250.70.34 (114.250.70.34): icmp_seq=2 ttl=117 time=4.82 ms--- g.cn ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 4.822/4.822/4.822/0.000 ms
[purpleendurer @ bash ~]
1.6 ping -d g.cn
[purpleendurer @ bash ~] ping -d g.cn
PING g.cn (114.250.67.34) 56(84) bytes of data.
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=1 ttl=116 time=3.95 ms
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=2 ttl=116 time=3.97 ms
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=3 ttl=116 time=3.92 ms
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=4 ttl=116 time=3.89 ms
64 bytes from 114.250.67.34 (114.250.67.34): icmp_seq=5 ttl=116 time=3.92 ms
^C
--- g.cn ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 3.896/3.933/3.976/0.062 ms
[purpleendurer @ bash ~]
1.7 ping -f g.cn:洪水 ping g.cn (只有超级用户才能使用此选项)
[purpleendurer @ bash ~] ping -f g.cn
PING g.cn (114.250.67.34) 56(84) bytes of data.
ping: cannot flood; minimal interval allowed for user is 200ms
[purpleendurer @ bash ~] sudo ping -f g.cn
PING g.cn (114.250.65.34) 56(84) bytes of data.
.^C
--- g.cn ping statistics ---
5304 packets transmitted, 5303 received, 0% packet loss, time 28698ms
rtt min/avg/max/mdev = 5.285/5.390/12.965/0.268 ms, pipe 2, ipg/ewma 5.411/5.371 ms
[purpleendurer @ bash ~]
1.8 ping -i 2 -c 3 g.cn:间隔2秒钟向g.cn发送3个ICMP包
[purpleendurer @ bash ~] ping -i 2 -c 3 g.cn
PING g.cn (114.250.65.34) 56(84) bytes of data.
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=1 ttl=117 time=5.49 ms
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=2 ttl=117 time=5.38 ms
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=3 ttl=117 time=5.40 ms--- g.cn ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 5.389/5.428/5.491/0.096 ms
[purpleendurer @ bash ~]
1.9 ping -q g.cn :以静默方式ping g.cn
[purpleendurer @ bash ~] ping -q g.cn
PING g.cn (114.250.65.34) 56(84) bytes of data.
^C
--- g.cn ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7010ms
rtt min/avg/max/mdev = 5.386/5.410/5.453/0.023 ms
[purpleendurer @ bash ~]
命令返回的信息除了启动时和完成时的总结行外,不显示任何内容。
1.10 ping -s 99 g.cn:以99个字节ping g.cn
[purpleendurer @ bash ~] ping -s 99 g.cn
PING g.cn (114.250.65.34) 99(127) bytes of data.
107 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=1 ttl=117 time=5.43 ms
107 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=2 ttl=117 time=5.44 ms
107 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=3 ttl=117 time=5.39 ms
^C
--- g.cn ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 5.396/5.427/5.449/0.088 ms
[purpleendurer @ bash ~]
1.11 ping -t 16 g.cn: 以TTL 值为16向g.cn发送ICMP包
[purpleendurer @ bash ~] ping -t 16 g.cn
PING g.cn (114.250.65.34) 56(84) bytes of data.
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=1 ttl=117 time=5.39 ms
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=2 ttl=117 time=5.40 ms
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=3 ttl=117 time=5.38 ms
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=4 ttl=117 time=5.39 ms
^C
--- g.cn ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 5.382/5.393/5.407/0.090 ms
[purpleendurer @ bash ~]
1.12 ping -T <时间戳> g.cn:设置特殊的 IP 时间戳选项来ping g.cn
[purpleendurer @ bash ~] ping -T tsandaddr g.cn
PING g.cn (114.250.66.34) 56(124) bytes of data.
^C
--- g.cn ping statistics ---
8 packets transmitted, 0 received, 100% packet loss, time 7166ms[purpleendurer @ bash ~] ping -T tsonly g.cn
PING g.cn (114.250.66.34) 56(124) bytes of data.
^C
--- g.cn ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4091ms[purpleendurer @ bash ~]
1.13 ping -v g.cn:启用详细模式ping g.cn
[purpleendurer @ bash ~] ping -v g.cn
PING g.cn (114.250.65.34) 56(84) bytes of data.
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=1 ttl=117 time=5.51 ms
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=2 ttl=117 time=5.40 ms
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=3 ttl=117 time=5.37 ms
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=4 ttl=117 time=5.45 ms
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=5 ttl=117 time=5.35 ms
64 bytes from 114.250.65.34 (114.250.65.34): icmp_seq=6 ttl=117 time=5.41 ms
^C
--- g.cn ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5006ms
rtt min/avg/max/mdev = 5.358/5.420/5.516/0.100 ms
[purpleendurer @ bash ~]
好像没有显示什么更详细的信息
3 参考资料
ping(8) - Linux man page (die.net)
相关文章:

Linux shell编程学习笔记66:ping命令 超详细的选项说明
0 前言 网络信息是电脑网络信息安全检查中的一块重要内容,Linux和基于Linux的操作系统,提供了很多的网络命令,今天我们研究最常用的ping命令。 1 ping命令 的功能、格式和选项说明 1.1 ping命令 的功能 简单来说, ping 命令 会…...

SSL/TLS和SSL VPN
1、SSL/TLS SSL安全套接字层:是一种加密协议,用于在网络通信中建立安全连接。它在应用层和传输层(TCP/IP)之间提供数据加密、服务器身份验证以及信息完整性验证 SSL只保护TCP流量,不保护UDP协议 TLS:传输层…...
浅谈WebSerice
一. 什么是WebService Web Service也称为web服务,它是一种跨编程语言和操作系统平台的远程调用技术。Web Service采用标准的SOAP协议传输(SOAP:Simple Object Access Protocol简单对象访问协议,soap属于w3c标准。并且soap协议是基…...
linux快速入门-学习笔记
linux快速入门-学习笔记 第一章:Linux系统概念及命令学习Linux系统基本概念命令终端介绍命令格式介绍Linux系统辨别目录与文件的方法通过文件详细属性辨别ls 查看目录/文件命令Linux 系统下的归属关系命令行编辑技巧Linux 基本权限的类别课后练习 第二章:…...
科普文:5种Linux下软件部署方式说明
在Linux世界里,高效、灵活地安装和管理软件是每个系统管理员和开发者的基本功。从传统的RPM包管理,到便捷的YUM软件仓库,再到颠覆性的Docker容器技术,Snap,源码安装,每一种方法都有其独到之处,适…...
Redisson中的RBlockingQueue的使用场景及例子
Redisson 的 RBlockingQueue 是一个实现了 Java BlockingQueue 接口的分布式队列,它可以用于在分布式系统中实现生产者-消费者模式。RBlockingQueue 提供了线程安全的阻塞队列操作,允许生产者在队列满时阻塞,消费者在队列空时阻塞,…...

【办公软件】Office 2019以上版本PPT 做平滑切换
Office2019以上版本可以在切页面时做平滑切换,做到一些简单的动画效果。如下在快捷菜单栏中的切换里选择平滑。 比如,在两页PPT中,使用同一个形状对象,修改了大小和颜色。 选择切换为平滑后,可以完成如下的动画显示。 …...
connect-multiparty中间件用法以及实例--文件上传中间件(保姆级别教学)
connect-multiparty中间件的用法包括安装和引入、基本设置、路由应用、文件处理以及安全和优化等步骤。 connect-multiparty是一个专为Connect和Express框架设计的文件上传中间件,它基于multiparty库,用于处理多部分表单数据,尤其针对文件上传…...

0503触发器的电路结构和工作原理
触发器的电路结构和工作原理 如何区分锁存器还是触发器, 看有没有这个三角符号,告诉是上升沿触发还是下降沿触发,没有三角符号就是电平触发。低电平触发就画个小圈。高电平触发就不画小圈。有小圈的三角就是下降沿触发 setup建立时间 hold 保…...
LeetCode:二叉树的中序遍历(C语言)
1、前序遍历:根左右 2、中序遍历:左根右 3、后序遍历:左右根 1、问题概述:二叉树中序遍历 2、示例 示例 1: 输入:root [1,null,2,3] 输出:[1,3,2] 示例 2: 输入:root […...
MySQL数据库基本安装与部署
目录 概念 数据库的基本概念 关系型数据库 非关系型数据库 MySQL 商业版与社区版 示例 初始化MySQL 添加系统服务 概念 数据库的基本概念 数据(Data) 描述事物的符号记录包括数字、文字、图形、图像、声音、档案记录等以“记录”形式按统一的…...

paraFoam 运行 报错 usr/lib/x86_64-linux-gnu/libQt5Core.so 已解决
在日常项目开发中。使用ubuntu 视图开发的时候。报错 缺少 libQt5Core 核心组件! whereis libQt5Core.so.5sudo strip --remove-section.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 完美解决,并且能正常打开,前提是,…...

科技前沿:Llama 3.1的突破与革新
在科技的长河中,每一次模型的更新都是对人类智慧的致敬。今天,我们将聚焦于Meta公司最新发布的Llama 3.1系列模型,探索其在AI领域的前沿突破。 新模型的诞生 自去年以来,Meta公司不断推进人工智能技术的发展,终于在近…...
每天一个数据分析题(四百四十七)- 业务系统
业务系统往往因为系统故障、设备故障、人为失误等原因导致数据中存在异常数据,下列哪一项方法对于发现异常值有帮助( ) A. 计算均值加减三倍标准差的范围 B. 梯度下降法 C. 相关性分析 D. 计算四分位距 数据分析认证考试介绍:…...
如何保护你的网络安全?
在2024年4月,一次创纪录的DDoS(分布式拒绝服务)攻击震惊了网络世界,这次攻击达到每秒840百万数据包(Mpps)。你可能会问,DDoS攻击到底是什么?为什么它这么重要呢? 什么是…...

Nginx 怎样处理请求的重试机制?
🍅关注博主🎗️ 带你畅游技术世界,不错过每一次成长机会! 文章目录 Nginx 怎样处理请求的重试机制?一、为何需要重试机制?二、Nginx 中的重试机制原理三、Nginx 重试机制的配置参数四、Nginx 重试机制的实际…...

自己开发软件实现网站抓取m3u8链接
几天前一个同学说想下载一个网站的视频找不到连接,问我有没有什么办法,网站抓取m3u8链接 网页抓取m3u8链接。当时一听觉得应该简单,于是说我抽空看看。然后就分析目标网页,试图从网页源码里找出连接,有的源代码直接有,但是有的没有…...
[Python3] 多模式字符串搜索 `Aho-Corasick`
ahocorasick.Automaton 是 Python 中 pyahocorasick 库提供的一个类,用于实现 Aho-Corasick 自动机。Aho-Corasick 算法是一种用于精确或近似多模式字符串搜索的高效算法。 通过 pip install pyahocorasick 安装 pyahocorasick 库。 并且,该模块是用 C 编…...
4 Types of Kaggle Competitions
1---Featured Competitions🤑🤑 These are comprehensive Machine Learning challenges posed by difficult, often business-oriented predictive problems. For example, 1⃣️Using customers history of buying insurance to predict the price t…...
【STM32】stm32中GPIO_ReadInputDataBit()是什么意思
GPIO_ReadInputDataBit()函数用于读取指定GPIO端口的某一引脚上的电平状态,并返回该引脚的电平是高电平(1)还是低电平(0)。 在STM32单片机中,GPIO(General-Purpose Input/Output)端…...
Vim 调用外部命令学习笔记
Vim 外部命令集成完全指南 文章目录 Vim 外部命令集成完全指南核心概念理解命令语法解析语法对比 常用外部命令详解文本排序与去重文本筛选与搜索高级 grep 搜索技巧文本替换与编辑字符处理高级文本处理编程语言处理其他实用命令 范围操作示例指定行范围处理复合命令示例 实用技…...

华为云AI开发平台ModelArts
华为云ModelArts:重塑AI开发流程的“智能引擎”与“创新加速器”! 在人工智能浪潮席卷全球的2025年,企业拥抱AI的意愿空前高涨,但技术门槛高、流程复杂、资源投入巨大的现实,却让许多创新构想止步于实验室。数据科学家…...

YSYX学习记录(八)
C语言,练习0: 先创建一个文件夹,我用的是物理机: 安装build-essential 练习1: 我注释掉了 #include <stdio.h> 出现下面错误 在你的文本编辑器中打开ex1文件,随机修改或删除一部分,之后…...
基础测试工具使用经验
背景 vtune,perf, nsight system等基础测试工具,都是用过的,但是没有记录,都逐渐忘了。所以写这篇博客总结记录一下,只要以后发现新的用法,就记得来编辑补充一下 perf 比较基础的用法: 先改这…...

【项目实战】通过多模态+LangGraph实现PPT生成助手
PPT自动生成系统 基于LangGraph的PPT自动生成系统,可以将Markdown文档自动转换为PPT演示文稿。 功能特点 Markdown解析:自动解析Markdown文档结构PPT模板分析:分析PPT模板的布局和风格智能布局决策:匹配内容与合适的PPT布局自动…...

Mac软件卸载指南,简单易懂!
刚和Adobe分手,它却总在Library里给你写"回忆录"?卸载的Final Cut Pro像电子幽灵般阴魂不散?总是会有残留文件,别慌!这份Mac软件卸载指南,将用最硬核的方式教你"数字分手术"࿰…...
uniapp中使用aixos 报错
问题: 在uniapp中使用aixos,运行后报如下错误: AxiosError: There is no suitable adapter to dispatch the request since : - adapter xhr is not supported by the environment - adapter http is not available in the build 解决方案&…...

selenium学习实战【Python爬虫】
selenium学习实战【Python爬虫】 文章目录 selenium学习实战【Python爬虫】一、声明二、学习目标三、安装依赖3.1 安装selenium库3.2 安装浏览器驱动3.2.1 查看Edge版本3.2.2 驱动安装 四、代码讲解4.1 配置浏览器4.2 加载更多4.3 寻找内容4.4 完整代码 五、报告文件爬取5.1 提…...
Device Mapper 机制
Device Mapper 机制详解 Device Mapper(简称 DM)是 Linux 内核中的一套通用块设备映射框架,为 LVM、加密磁盘、RAID 等提供底层支持。本文将详细介绍 Device Mapper 的原理、实现、内核配置、常用工具、操作测试流程,并配以详细的…...

【数据分析】R版IntelliGenes用于生物标志物发现的可解释机器学习
禁止商业或二改转载,仅供自学使用,侵权必究,如需截取部分内容请后台联系作者! 文章目录 介绍流程步骤1. 输入数据2. 特征选择3. 模型训练4. I-Genes 评分计算5. 输出结果 IntelliGenesR 安装包1. 特征选择2. 模型训练和评估3. I-Genes 评分计…...